Please excuse the long-winded nature of this posting. Sometimes science must
be long-winded to be comprehensive and useful.
I believe this has to do with the caching mechanism in blackbox. If you are
short on RAM and would like to reduce this memory utilization, you may wish to
adjust the "session.cacheMax" and "session.cacheLife" settings in
".blackboxrc".
The executive summary here is that (I believe) a higher cache life/max should
generally buy you more speed at the expense of memory usage; at least that is
the intent. So if you have RAM to spare, it may be worthwhile. I have not
done any speed comparisons though. The higher cache max will allow more
growth of X (naturally), but not an indefinte growth. Setting cache life and
cache max to zero will minimize memory usage (possibly) at the expense of some
speed. It does appear however that even with both cache max and cache life at
zero that X memory usage is growing, which probably indicates a memory leak
somewhere along the line (either blackbox or X). From the icewm results
given, one would postulate that it would be blackbox. Perhaps a good code
cleaning is in order.
Just from experience, I noticed when I used BlackBox "out of the box" I had an
average X memory usage of about 20-24MB and when I adjusted cacheMax to 20
(rather than 200), then average X memory usage dropped to about 14-18MB.
These tests were done on a 200MHz Pentium Pro with 64MB of RAM, 45MB swap
partition, RedHat 6.2 (with kernel 2.2.12-20) and BlackBox 0.60.2.
Here are my results with cacheLife = 5 and cacheMax = 20.
Just Eterm:
957 root 14 0 8640 8640 2008 S 0 0.1 13.6 0:01 X
965 mbenson 4 0 2740 2740 1544 S 0 0.3 4.3 0:00 Eterm
961 mbenson 0 0 1632 1632 1148 S 0 0.0 2.5 0:00 blackbox
After Eterm maximize and restore:
957 root 9 0 10532 10M 2008 S 0 0.9 16.6 0:02 X
965 mbenson 2 0 2956 2956 1544 S 0 0.0 4.6 0:00 Eterm
961 mbenson 0 0 1632 1632 1148 S 0 0.0 2.5 0:00 blackbox
After another Eterm maximize and restore:
957 root 16 0 10568 10M 2008 R 0 0.6 16.6 0:03 X
965 mbenson 2 0 3132 3132 1544 S 0 0.3 4.9 0:00 Eterm
961 mbenson 1 0 1632 1632 1148 S 0 0.0 2.5 0:00 blackbox
One more Eterm maximize and restore:
957 root 10 0 10568 10M 2008 R 0 0.7 16.6 0:04 X
965 mbenson 1 0 3136 3136 1544 S 0 0.0 4.9 0:00 Eterm
961 mbenson 0 0 1632 1632 1148 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
957 root 18 0 14624 14M 2052 R 0 0.3 23.0 0:06 X
965 mbenson 1 0 3136 3136 1544 S 0 0.1 4.9 0:01 Eterm
961 mbenson 1 0 1636 1636 1152 S 0 0.0 2.5 0:00 blackbox
Load StarOffice 5.2 beta, maximize, restore, and close:
957 root 10 0 14500 14M 2068 R 0 0.3 22.9 0:07 X
965 mbenson 1 0 3136 3136 1544 S 0 0.0 4.9 0:01 Eterm
961 mbenson 1 0 1640 1640 1156 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
957 root 13 0 14784 14M 2068 R 0 0.7 23.3 0:09 X
965 mbenson 1 0 3136 3136 1544 S 0 0.1 4.9 0:01 Eterm
961 mbenson 1 0 1640 1640 1156 S 0 0.0 2.5 0:01 blackbox
Here are my results with cacheLife = 5 and cacheMax = 200 (I believe this is
how blackbox ships):
Just Eterm:
1208 root 9 0 8640 8640 2008 S 0 0.7 13.6 0:01 X
1216 mbenson 2 0 2748 2748 1544 S 0 0.0 4.3 0:00 Eterm
1212 mbenson 1 0 1584 1584 1148 S 0 0.0 2.5 0:00 blackbox
After Eterm maximize and restore:
1208 root 10 0 14216 13M 2008 R 0 1.3 22.4 0:02 X
1216 mbenson 1 0 2996 2996 1544 S 0 0.0 4.7 0:00 Eterm
1212 mbenson 0 0 1588 1588 1148 S 0 0.0 2.5 0:00 blackbox
After another Eterm maximize and restore:
1208 root 10 0 14240 13M 2008 R 0 1.7 22.4 0:03 X
1216 mbenson 1 0 2996 2996 1544 S 0 0.0 4.7 0:00 Eterm
1212 mbenson 0 0 1588 1588 1148 S 0 0.0 2.5 0:00 blackbox
One more Eterm maximize and restore:
1208 root 14 0 14240 13M 2008 R 0 3.3 22.4 0:04 X
1216 mbenson 0 0 2996 2996 1544 S 0 0.0 4.7 0:00 Eterm
1212 mbenson 0 0 1588 1588 1148 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
1208 root 13 0 22120 21M 2044 R 0 3.3 34.9 0:05 X
1216 mbenson 0 0 2996 2996 1544 S 0 0.1 4.7 0:00 Eterm
1212 mbenson 1 0 1604 1604 1152 S 0 0.1 2.5 0:00 blackbox
Load StarOffice 5.2 beta, maximize, restore, and close:
1208 root 14 0 24284 14M 1872 R 0 1.5 24.2 0:08 X
1216 mbenson 2 0 2996 2996 1544 S 0 0.5 4.7 0:01 Eterm
1212 mbenson 0 0 1608 1608 1156 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
1208 root 19 0 24656 18M 4616 S 0 0.5 29.1 0:10 X
1216 mbenson 1 0 2996 2996 1544 R 0 0.1 4.7 0:01 Eterm
1212 mbenson 0 0 1608 1608 1156 S 0 0.0 2.5 0:00 blackbox
Here are my results with cacheMax = 0 and cacheLife = 0:
Just Eterm:
1330 root 2 0 8592 8592 2008 S 0 0.3 13.5 0:01 X
1338 mbenson 1 0 2420 2420 1548 S 0 0.0 3.8 0:00 Eterm
1334 mbenson 0 0 1632 1632 1148 S 0 0.0 2.5 0:00 blackbox
After Eterm maximize and restore:
1330 root 11 0 8752 8752 2008 R 0 2.9 13.8 0:02 X
1338 mbenson 0 0 2640 2640 1548 S 0 0.0 4.1 0:00 Eterm
1334 mbenson 0 0 1612 1612 1152 S 0 0.0 2.5 0:00 blackbox
After another Eterm maximize and restore:
1330 root 13 0 8792 8792 2008 R 0 2.7 13.8 0:03 X
1338 mbenson 0 0 2640 2640 1548 S 0 0.0 4.1 0:00 Eterm
1334 mbenson 1 0 1612 1612 1152 S 0 0.0 2.5 0:00 blackbox
One more Eterm maximize and restore:
1330 root 15 0 8792 8792 2008 R 0 3.1 13.8 0:04 X
1338 mbenson 1 0 2648 2648 1548 S 0 0.0 4.1 0:00 Eterm
1334 mbenson 1 0 1612 1612 1152 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
1330 root 12 0 9500 9500 2048 S 0 1.5 15.0 0:06 X
1338 mbenson 0 0 2648 2648 1548 R 0 0.0 4.1 0:00 Eterm
1334 mbenson 1 0 1616 1616 1156 S 0 0.0 2.5 0:00 blackbox
Load StarOffice 5.2 beta, maximize, restore, and close:
1330 root 12 0 9516 9516 2064 R 0 1.5 15.0 0:08 X
1338 mbenson 1 0 2648 2648 1548 S 0 0.1 4.1 0:00 Eterm
1334 mbenson 0 0 1620 1620 1160 S 0 0.0 2.5 0:00 blackbox
Load netscape, maximize, restore, and close:
1330 root 14 0 9668 9668 2064 R 0 0.3 15.2 0:10 X
1338 mbenson 0 0 2648 2648 1548 S 0 0.0 4.1 0:00 Eterm
1334 mbenson 1 0 1620 1620 1160 S 0 0.0 2.5 0:00 blackbox
Jose Romildo Malaquias wrote:
> Hello.
>
> I am just trying Blackbox. Currently I am using icewm as my window manager,
> so I decided to compare the memory usage of both window managers.
>
> At startup I get the following (from the top program) for Blackbox
> (with default style) and icewm:
>
> PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
> 14137 root 2 0 7384 7384 1964 S 0 0.3 11.7 0:01 X
> 14149 romildo 1 0 2432 2432 1768 S 0 0.1 3.8 0:00 Eterm
> 14141 romildo 0 0 1744 1744 1244 S 0 0.0 2.7 0:00 blackbox
>
> Then I take the following actions:
> maximized and then restored Eterm,
> opened, maximized, restored and then closed netscape navigator,
> opened, maximized, restored and then closed xemacs,
> opened, maximized, restored and then closed write,
>
> and after that, top gives the following memory usage:
>
> PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
> 14137 root 12 0 22336 21M 2000 R 0 0.5 35.5 0:06 X
> 14149 romildo 1 0 2556 2556 1772 S 0 0.1 4.0 0:00 Eterm
> 14141 romildo 1 0 1808 1808 1252 S 0 0.0 2.8 0:01 blackbox
>
> With icewm, initialy I got:
>
> PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
> 14584 root 3 0 5196 5196 1968 S 0 0.8 8.2 0:00 X
> 14588 romildo 1 0 2760 2760 1664 S 0 0.0 4.3 0:00 icewm
> 14598 romildo 0 0 2436 2436 1772 S 0 0.0 3.8 0:00 Eterm
>
> and after the same operations mentioned above:
>
> PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
> 14584 root 18 0 6432 6432 2000 S 0 1.5 10.2 0:05 X
> 14588 romildo 1 0 2768 2768 1668 S 0 0.0 4.4 0:01 icewm
> 14598 romildo 2 0 2548 2548 1772 S 0 0.3 4.0 0:00 Eterm
>
> Conclusion:
> X may be keepin memory allocated even after the program has been
> closed only under Blackbox. This may be better noticed when we do
> operations involving redimensioning windows.
>
> Query:
> Is it a bug with Blackbox, or is it a "normal" behaviour?
>
> Any hints?
>
> Romildo
> --
> Prof. Jos� Romildo Malaquias <[EMAIL PROTECTED]>
> Departamento de Computa��o
> Universidade Federal de Ouro Preto
> Brasil
--
***************************************************************
* Markland J. Benson * IV&V Analyst *
* Azimuth, Inc. * NASA Software IV&V Facility *
* 100 University Drive * Phone: (304) 367-8364 *
* Fairmont, WV 26554 * Fax: (304) 367-8221 *
***************************************************************