Memory usage in X.org with thin clients
Markus Hakansson
mh at samurajdata.se
Wed Mar 30 08:46:12 PST 2005
Hello, everybody.
I am not sure this is the right place to ask this but here goes anyway.
Oh, and sorry for the long post...
I have set up some home-built thin clients and one HP TC5515, both types
boot Linux from the network and are completely disk-free.
The clients mounts a root-partition and starts X.Org currently 6.8.2
that requests a login-screen from the net.
The longer a user-session progresses the more memory is consumed by the
X-server until the machine is starved of memory and the kernel kills the
X-server (or freezes when overcommit is turned off).
It is very obvious when looking at memory-consumption in top that %MEM
for the X-server starts at somewhere around 12% and keeps going until it
reaches 100% (or thereabout).
It mostly happens when a web browser has been running for several hours
(or days), and most often when it has been playing flash-files. But I
have noticed that for instance Gimp also pushes the memory usage to 100%
after it has been used for a while.
I thought that it was a resource-leak primarily in the flash-player and
started comparing the changes in what xrestop displays and what top
displays when a machine is running. It turned out that according to
xrestop the allocated resources in the X-server where only around 7MB
but X had a RES (in top) of 70MB (ie 100%). The numbers in xrestop did
not change at all during the test, btw.
I then started to remove as many extensions as I could and it seems as
the resource-leak was reduced but not gone. However when I killed the
web-browser just before the machine would crash almost all of the memory
was returned, I am not sure but I don't think this was the case before I
reduced the number of extensions.
This was the list of the minimal extensions I could manage to get:
(it is a fedora core Xorg 6.8.2 but I have tried with 6.8.0 and 6.8.1)
DAMAGE
LBX
MIT-SHM
RANDR
RENDER
SECURITY
XC-APPGROUP
XFIXES
XFree86-Bigfont
XInputExtension
XKEYBOARD
XTEST
(it uses the XDMCP-server for XFS also, so no local font-files are used)
The systems are like this:
VIA EPIA-M6000 with 96MB system memory and 32MB gfx-mem.
The graphics-card is the integrated VIA CLE266 and I am using the
Unichrome-drivers.
The HP5515 has:
56MB system-memory and a 16MB Radeon 7000/VE (RV100) and I am using the
Radeon driver included with Xorg.
Both use a home-compiled 2.6.10, but I have tried several older releases
back to 2.6.5.
Can a program leak resources that are not shown in xrestop?
Do you know any good ways to track this down?
I also tried to limit the X-resources by using -ld -lf and -ls but I
could not make it work very well.
Any other way this could be dealt with? I have been battling this
problem on and off for several months now, and I feel that I have run
out of ideas and knowledge about X.
Thank you in advance,
Markus Hakansson
More information about the xorg
mailing list