LWN.net Logo

Real-life optimization work

Real-life optimization work

Posted Nov 3, 2005 9:16 UTC (Thu) by rossburton (subscriber, #7254)
In reply to: Real-life optimization work by jwb
Parent article: All hail the speed demons (O'Reillynet)

Ah the classic "foo takes 20M it's evil!" argument.

10M of virtual memory, most of which is shared. That's GTK+, Pango, GConf, Bonobo, for a start, and often the Evolution calendar libraries being loaded to display your appointments and tasks in the calendar. Heap wise, the clock uses a meg, and the executable code itself is 72K.

pmap is your friend. Bannish the ignorance and see how memory is actually being used! I found an interesting bug in Evolution Data Server which resulted in vastly inflated "ps" memory counts: threads were not being destroyed correctly and for every thread (read: contact search) 8M was added to the VM size. Of this 8M only 4 bytes was actually used (it's the thread stack, and the thread didn't return anything), but it's easy to get "ps" sizes in the hundred of megabytes this way. One line patch later, bug fixed.


(Log in to post comments)

Real-life optimization work

Posted Nov 3, 2005 18:44 UTC (Thu) by dann (guest, #11621) [Link]

Well it would be nice if the calendar and appointment functionality would be loaded on demand. If one does not use evolution, then there's little point in
loading all those libraries, it just slows down the startup.

About pmap, it would be great if the linux pmap printed more details about the maps like the Solaris pmap -x:

Address Kbytes Resident Shared Private Permissions Mapped File
00010000 1688 1616 1616 - read/exec emacs
001C4000 4904 4816 1208 3608 read/write/exec emacs
...

This way you more more exactly how memory is used.

Real-life optimization work

Posted Nov 4, 2005 13:27 UTC (Fri) by nix (subscriber, #2304) [Link]

That is coming now the kernel exports that sort of info (as of 2.6.14).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds