Hello Camm.

Nice to hear from you again.

On Tue, 13 Sep 2016, Camm Maguire wrote:

> It appears that all is working as intended, that gc is triggered and
> keeping the active heap to about 2.8Gb (or 3.9Gb with relocatable copy
> area) of a detected max of 5.3Gb (see core pages, and physical memory).
> At the end of this experiment, the rss of this process as viewed from a
> separate shell should confirm these figures.  So I do not think gcl is
> expanding into swap here.

Ok, even if it's working as intended, maybe the intended way is still
not the optimal way :-), and maybe we might still consider to change the
intended way. I'll elaborate on that below.

> As for the /proc/meminfo, all I can say is that the build employs many
> other programs as well.  Might be interesting to correlate this figure
> with the various stages of the build.  In other words, how much just to
> run the debian/rules build target, etc.

That's probably the problem.

The garbage collection procedure may be very well designed not to take
all available memory, but this good care it takes ends up being not enough
when we consider all the other processes involved in the build of the
package, i.e. the build process as a whole.

The current procedure is a little bit "egoistical", so to speak, as it
takes almost all the available memory for himself, not leaving enough memory for
the other processes.

The problem I'd like to see fixed is the amount of memory used by the
Debian package build as a whole, for which the garbage collection thing is
only a part.

If you can fix this problem by fine-tuning GCL, fine, but if not,
I'd like you to consider the problem as a whole, not just the garbage
collection thing.

Maybe this is just a matter of setting

GCL_MEMORY_something=somevalue

somewhere in debian/rules and nothing less. I really don't know.


But I'll better describe what I do in case you want to replicate my
results. It's quite simple indeed.

When my autobuilder starts building a package (just before it starts),
it takes note of the value of Committed_AS in /proc/meminfo.

Then the build starts and it keeps taking notes of Committed_AS at every
second, then substracts the initial value and stores the difference.

At the end I have a text file with the amount of memory that it was
committed during the build. I call this "memory profile".

(My autobuilder does not do anything else other than building a
package at a time, so this is as accurate as it can be with the
limited available resources I have).

I attach the two memory profiles I have for maxima.

I do not remember how much memory these two autobuilders had, because
I often change the configuration from time to time, but I'm almost
sure that I did not have 17 GB as required by "lutecio" (the second
attach). If my records are correct, this was a Linode with only
8 GB of RAM (and maybe a similar amount of swap).


So, to summarize: Would you please try observing Committed_AS in
/proc/meminfo while the Debian maxima package is building to see if
you can reproduce what I report, i.e. that the amount of memory it
takes is usually a lot more than the available RAM?

Thanks a lot.
0
0
40
40
40
40
92
67
67
67
67
67
105
40
40
40
40
40
40
66
66
135
135
63
66
66
104
102
49
66
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
79
78
78
78
78
94
94
94
94
94
94
94
94
94
94
78
78
78
78
78
78
78
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
94
97
97
97
97
97
97
97
97
97
97
97
113
128
83
83
98
93
93
93
93
91
137
138
137
82
69
69
40
61
61
61
61
61
83
59
75
60
61
61
2370
2370
2387
2387
2387
2403
2377
2385
2404
2404
2385
2370
2370
2385
2370
2401
2417
2417
2417
2417
2432
2403
2382
2417
2433
2449
2465
2465
2465
2370
2403
2370
2370
2385
2370
2385
2370
2386
2386
2370
2385
2401
2401
2370
2386
2370
2385
2370
2385
2385
2385
2386
2386
2385
2386
2404
2417
2449
2464
2480
2496
2371
2419
2451
2483
2404
2370
2380
2419
2451
2388
2388
4680
2371
2420
2389
2402
2388
2421
2404
2388
2388
2402
2384
2404
2404
2404
2387
2387
2387
2387
2371
2387
2404
2384
2371
2403
2435
2419
2434
2468
2483
2483
2387
2404
2404
2420
2388
2387
2387
2381
2419
2450
2387
2418
2466
2481
2503
2503
2519
2402
2434
2418
2450
2467
2498
2515
2387
2436
2469
2485
2388
2421
2388
2389
2387
2387
2434
2467
2499
2389
2388
2387
2434
2450
2483
2500
2389
2389
2404
2404
2387
2402
2418
2389
2383
2465
2483
2500
2515
2515
2531
2531
2548
2548
2548
2564
2564
2580
2580
2597
2597
2597
2613
2613
2630
2630
2645
2415
2371
2406
2437
2453
2404
2435
2387
2403
2420
2419
2435
2466
2371
2421
2421
2438
2471
2419
2450
2465
2389
2402
2434
2466
2482
2371
2370
4678
2381
2372
2386
2387
2370
2370
2370
2386
2370
2370
2403
2384
2403
2386
2418
2451
2370
2403
2386
2370
2385
2385
2385
2386
2386
2370
2386
2377
2385
2401
2370
2386
2386
2385
2386
2370
2386
2386
2386
2401
2370
2386
2387
2417
2435
2466
2497
2420
2436
2468
2387
2385
2403
2418
2434
2388
2404
2404
2387
2404
2436
2436
2386
2386
2404
2371
2387
2404
2381
2406
2388
2388
2388
2382
2387
2386
2371
2386
2386
2404
2388
2388
2418
2435
2420
2452
2483
2388
2405
2404
2387
2388
2387
2388
2403
2434
2450
2388
2434
2482
2499
2402
2435
2434
2450
2482
2497
2419
2450
2466
2391
2405
2388
2405
2405
2386
2418
2451
2467
2498
2388
2404
2388
2387
2435
2451
2483
2388
2404
2404
2387
2402
2420
2404
2387
2452
2485
2502
2536
2553
2570
2603
2603
2619
2619
2619
2634
2634
2414
2387
2405
2438
2454
2405
2387
2387
2405
2437
2418
2451
2387
2404
2402
2435
2372
2420
2452
2388
2387
2436
2451
2371
2370
2370
62
101
132
163
194
225
240
240
240
240
64
64
64
64
59
2387
2403
2466
2499
2531
2547
2547
2547
2547
2450
2435
2438
2438
2457
2434
2434
2449
2449
2449
2449
2449
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2464
2480
2480
2480
2480
2480
2495
2495
2495
2495
2495
2511
2511
2511
2511
2511
2511
2511
2511
2526
2526
2526
2526
2526
2526
2526
2526
2526
2542
2542
2542
2557
2557
2573
2573
2588
2588
2588
2588
2588
2604
2604
2604
2604
2604
2604
2619
2619
2619
2619
2634
2634
2634
2634
2634
2634
2634
2634
2650
2650
2650
2650
2650
2650
2665
2665
2665
2665
2665
2681
2681
2681
2681
2681
2681
2681
2681
2681
2696
2696
2696
2696
2696
2696
2696
2696
2696
2712
2712
2712
2712
2712
2712
2727
2727
2727
2727
2727
2743
2743
2743
2743
2743
2758
2758
2758
2758
2773
2773
2773
2773
2789
2789
2789
2789
2789
2789
2789
2804
2804
2804
2804
2804
2804
2820
2820
2820
2820
2820
2835
2835
2835
2835
2835
2835
2835
2835
2835
2851
2851
2851
2851
2851
2851
2851
2851
2851
2851
2866
2866
2866
2866
2866
2866
2866
2866
2882
2882
2882
2882
2897
2897
2897
2897
2897
2897
2913
2913
2928
2928
2928
2928
2928
2943
2943
2959
2974
2974
2990
3005
3021
3021
3036
3036
3052
3052
3067
3082
3082
3098
3113
3113
3129
3129
3144
3144
3160
3160
3160
3175
3175
3175
3175
3175
3191
3191
3191
3206
3206
3222
3222
3237
3252
3252
3268
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
3283
6510
3279
3279
3279
3279
3279
3279
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3287
3334
3334
3349
3349
3349
3349
3349
3349
3349
3349
3349
3365
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
3426
47
47
47
47
47
47
48
48
48
63
63
63
63
63
63
63
63
63
63
63
155
155
155
155
155
155
155
155
155
155
155
155
155
155
155
155
155
57
57
40
56
66
66
66
104
66
96
96
96
96
96
96
96
96
96
96
96
96
96
96
96
96
96
102
49
48
52
79
82
76
76
76
50
52
72
76
51
79
83
83
96
105
92
107
110
102
102
102
108
108
103
97
99
101
109
109
109
113
102
105
106
97
97
108
108
109
108
90
90
91
102
100
103
90
98
145
146
109
106
157
145
148
68
69
74
79
59
67
63
73
95
81
81
56
65
61
70
91
71
6868
6869
6895
6885
6875
6894
6894
6918
6866
6875
6882
6883
6883
6875
6869
6879
6878
6895
6921
6930
6904
6888
6908
6934
6943
6960
6984
6884
6901
6885
6890
6875
6883
6876
6898
6876
6886
6877
6894
6875
6883
6883
6875
6881
6890
6890
6890
6885
6867
6877
6875
6890
6875
6868
6885
6885
6894
6891
6877
6884
6878
6868
6878
6877
6872
6882
6877
6885
6867
6918
6926
6951
6951
6967
6975
7001
6904
6920
6938
6962
6980
6873
6899
6887
6904
6902
6919
6936
6866
6886
6897
6894
6910
6870
6898
6923
6931
6892
6900
6885
6903
6920
6869
6895
6870
6879
6898
6900
6909
6889
6898
6895
6867
6902
6879
6880
6888
6881
6878
6902
6894
6878
6896
6905
6887
6869
6903
6919
6927
6879
6923
6939
6964
6870
6870
6886
6912
6893
6920
6928
6885
6892
6893
6876
6892
6909
6908
6926
6934
6959
6879
6874
6926
6951
6978
6990
7005
6872
6909
6927
6871
6923
6941
6967
6983
7001
7018
6931
6949
6958
6975
6991
6880
6897
6913
6887
6887
6872
6895
6883
6888
6920
6938
6946
6971
6979
6996
6885
6902
6894
6879
6906
6906
6932
6941
6957
6965
6981
6989
6891
6892
6867
6896
6877
6878
6896
6914
6923
6895
6920
6888
6950
6969
6977
7002
7019
7027
7051
7059
7075
7083
7101
7109
6912
6893
6879
6904
6913
6939
6956
6896
6921
6878
6877
6879
6896
6921
6939
6911
6937
6953
6961
6878
6896
6877
6916
6925
6933
6959
6899
6925
6933
6933
6957
6888
6890
6869
6916
6932
6949
6957
6982
6880
6881
6872
6877
6902
6869
6877
6875
6883
6908
6882
6877
6882
6883
6874
6874
6891
6881
6892
6908
6924
6894
6911
6885
6913
6930
6948
6965
6871
6896
6883
6891
6875
6884
6878
6891
6886
6891
6881
6887
6876
6884
6892
6881
6883
6877
6884
6883
6906
6876
6875
6890
6883
6875
6884
6876
6884
6892
6877
6883
6883
6875
6890
6874
6889
6881
6887
6887
6878
6922
6930
6946
6964
6973
6873
6907
6925
6942
6959
6873
6877
6901
6881
6905
6881
6914
6931
6947
6878
6887
6878
6903
6892
6885
6911
6938
6892
6894
6885
6894
6913
6936
6893
6893
6896
6886
6878
6904
6929
6901
6901
6892
6909
6894
6919
6872
6880
6879
6868
6878
6888
6881
6890
6900
6924
6895
6875
6903
6921
6938
6911
6928
6944
6961
6878
6880
6898
6885
6903
6928
6891
6892
6880
6887
6897
6880
6907
6925
6941
6959
6889
6923
6941
6973
6975
6991
6895
6904
6920
6870
6922
6939
6955
6973
6991
7008
6915
6931
6947
6964
6964
6973
6998
6870
6905
6879
6889
6892
6884
6901
6884
6882
6907
6933
6941
6950
6974
6984
7000
6894
6876
6895
6875
6909
6928
6953
6969
6986
6880
6879
6878
6898
6886
6886
6897
6915
6888
6906
6870
6933
6959
6975
6991
7008
7023
7041
7065
7081
7089
7113
7121
6891
6883
6888
6913
6930
6946
6861
6887
6913
6877
6868
6909
6925
6896
6913
6938
6955
6886
6893
6910
6880
6916
6933
6952
6896
6914
6939
6884
6876
6901
6910
6919
6935
6961
6977
6887
6870
6867
6867
75
104
127
143
167
182
206
222
237
237
245
245
253
74
74
74
74
74
74
74
6898
6935
6980
7004
7013
7029
7037
13790
6961
6952
6952
6938
6963
6949
6961
6970
6966
6990
7076
7192
7317
7442
7574
7707
7832
7964
8097
8222
8284
8424
8564
8705
8845
8954
8954
8946
8946
8954
17821
8944
8944
17823
8952
8952
8952
8952
8952
8952
8945
8953
8953
8953
8953
8945
8945
8945
8945
8945
8945
8945
8945
8945
8945
8953
8953
8953
8953
8953
8953
8953
8953
8953
8945
8945
8945
8937
8937
8937
8945
8945
8969
8992
9226
9226
9226
9226
9226
9226
9234
9234
9234
9234
9234
9226
9218
9335
9342
9342
9342
9342
9342
9342
9342
9342
9342
9350
9350
9350
9350
9350
9350
9350
9350
9350
9350
9334
9334
9334
9342
9342
9342
9373
9373
9373
9373
9373
9373
9373
9373
9381
9381
9381
9381
9381
9381
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9381
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
9373
100
64
66
66
63
74
72
70
78
85
82
82
70
78
84
77
78
66
75
71
75
75
72
162
162
162
162
170
179
172
172
172
164
164
171
171
173
173
173
173
173
173
173
173
173
173
173
165
165
58
72
53
78
81
81
81
100
95
103
98
110
49

Reply via email to