X server memory footprint growing continuously and monotonically over time

Omari Stephens xsdg at mit.edu
Sat Nov 10 22:39:03 PST 2007


Hi, all.  This is a continuation to my email "X server occupying > 1 GB of 
memory".  Since that email, my box ran completely out of memory (thank goodness 
for the OOM-killer), so I restarted X and had most of my 2 gigs back, as expected.

This time, I'm using the "nv" driver rather than "nvidia", and have found 
similar behavior (though, given the difference between my uptime and the time 
since I sent my original email, this seems to be increasing less quickly). See

http://people.csail.mit.edu/xsdg/x-mem/nov2/x-memory.png

Note that the X server's memory footprint grows at a fixed rate of about 0.5 
megabytes per hour.  That is, every 24 hours, X packs on about 12 megs of 
memory.  On top of this base rate, pixmaps cause the footprint to grow and 
shrink a bit, but after around 2 weeks, the space used for pixmaps is less than 
half of what X is using itself.

Again, if anybody has any ideas of things to check, things to poke at, or folks 
to talk to, I am sort of desperate.



I gathered this data by running the following in bash:
while (sleep 900); do (date; grep heap /proc/`pidof X`/maps; printf "%s\n\n" 
`pidof X`) >> xmem.log; done

I do the subtraction with the following two-liner:
awk '/heap/ {print $1}' < xmem.log | \
ruby -ne 'a = $_.strip.split(/-/).reverse; printf("0x%s - 0x%s = %d\n", a[0], 
a[1], a[0].to_i(16) - a[1].to_i(16))'

I ran the data through R to do a quick regression.

--xsdg




More information about the xorg mailing list