> When dealing with systems that are running X server(s), it also is useful
to know that GUI programs often use bitmaps (and other resources) that
are actually accounted in X server at some point, and this will lead to
somewhat skewed memory usage results.
xrestop can give some stats about those resources. However, I used to have the gut feeling that the increase in memory usage of the X server caused by client programs is bigger than the one reported by xrestop.
For instance, right now ~130M (mostly for pixmaps, with 40M for Firefox with ~60 tabs in 4 windows) are allocated by client programs on my system, out of 300M of X's RSS, and 390M of anonymous data memory (i.e. mostly heap).
Time ago, I read on some blog about optimizations for OLPC that the funny thing is that those cached bitmaps are _uncompressed_ (yes, even for JPEGs), and that Firefox caches all bitmaps from all pages. That's a real pity, since decompressing them on the fly would be surely faster than swapping, and maybe even faster than loading them from memory (not sure on this, unless the graphic card supports loading JPEGs in memory).