You are not logged in.
Pages: 1
According to htop, Xorg is using 45.9% of my RAM (229M RES), even more than Firefox (20.2%, 101M RES). RAM usage is at 401 MB of 512 MB (allegedly 499 MB) (80%), and swap usage is at 15.1 MB of 1.86 GB (0%).
After restarting X, it is using 3.6% of my RAM (18428 RES), RAM usage is at 106 MB (21%), and swap usage is at 496 KB (0%).
Why should I have to restart X? I have read that the high RAM usage is due to caching, but it swaps the more I use it, causing it to be slow.
Is there a way to fix the memory leak?
Window manager: StumpWM
Video driver: nv
Video card: nVidia Corporation NV6 [Vanta/Vanta LT] (rev 15) (taken from lspci output)
Last edited by woddfellow2 (2011-07-20 09:12:36)
1-Crawl 2-Cnfg 3-ATF 4-Exit ?
Offline
[...]
Why should I have to restart X? I have read that the high RAM usage is due to caching, but it swaps the more I use it, causing it to be slow.
Xorg having high memory-usage is not caused by caching. Caching would cause the kernel to reserve more memory, which can be seen using `free -m`. These caches will be dropped when the memory is required by another application.
So it seems Xorg is indeed taking up the memory itself. I think a good place to start would be pmap, so have a look at
sudo pmap -x `pidof /usr/bin/X`
Offline
Output of sudo pmap -x `pidof /usr/bin/X`:
27597: /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.YBIvl2ou2B
Address Kbytes RSS Anon Locked Mode Mapping
08048000 1908 - - - r-x-- Xorg
08225000 48 - - - rw--- Xorg
08231000 40 - - - rw--- [ anon ]
08860000 305116 - - - rw--- [ anon ]
b228a000 7624 - - - rw--- [ anon ]
b2e1d000 7624 - - - rw--- [ anon ]
b3602000 7624 - - - rw--- [ anon ]
b4194000 4544 - - - rw--- [ anon ]
b4a8b000 4804 - - - rw--- [ anon ]
b5148000 1540 - - - rw--- [ anon ]
b52c9000 384 - - - rw-s- [ shmid=0xb550000 ]
b5329000 352 - - - rw--- [ anon ]
b53ed000 228 - - - rw--- [ anon ]
b5426000 228 - - - rw--- [ anon ]
b545f000 904 - - - r-x-- libstdc++.so.6.0.16
b5541000 16 - - - r---- libstdc++.so.6.0.16
b5545000 4 - - - rw--- libstdc++.so.6.0.16
b5546000 28 - - - rw--- [ anon ]
b554d000 3296 - - - r-x-- swrastg_dri.so
b5885000 68 - - - rw--- swrastg_dri.so
b5896000 308 - - - rw--- [ anon ]
b58e3000 8192 - - - rw-s- resource1_wc
b60e3000 408 - - - r-x-- libxaa.so
b6149000 8 - - - rw--- libxaa.so
b614b000 136 - - - r-x-- libfb.so
b616d000 4 - - - rw--- libfb.so
b616e000 16384 - - - rw-s- resource0
b716e000 24 - - - r-x-- libvgahw.so
b7174000 4 - - - rw--- libvgahw.so
b7175000 256 - - - rw-s- mem
b71d2000 228 - - - rw--- [ anon ]
b720b000 228 - - - rw--- [ anon ]
b727a000 152 - - - r-x-- libexpat.so.1.5.2
b72a0000 8 - - - rw--- libexpat.so.1.5.2
b72ad000 32 - - - r-x-- evdev_drv.so
b72b5000 4 - - - rw--- evdev_drv.so
b72b6000 64 - - - rw-s- mem
b72c6000 148 - - - r-x-- libint10.so
b72eb000 4 - - - rw--- libint10.so
b72ec000 4 - - - rw--- [ anon ]
b72ed000 148 - - - r-x-- nv_drv.so
b7312000 8 - - - rw--- nv_drv.so
b7314000 104 - - - r-x-- libextmod.so
b732e000 4 - - - rw--- libextmod.so
b732f000 396 - - - r-x-- libglx.xorg
b7392000 8 - - - rw--- libglx.xorg
b7394000 4 - - - rw--- [ anon ]
b7395000 40 - - - r-x-- libdrm.so.2.4.0
b739f000 4 - - - rw--- libdrm.so.2.4.0
b73a6000 28 - - - r-x-- librecord.so
b73ad000 4 - - - rw--- librecord.so
b73ae000 20 - - - r-x-- libdri2.so
b73b3000 4 - - - rw--- libdri2.so
b73b4000 112 - - - r-x-- libgcc_s.so.1
b73d0000 4 - - - rw--- libgcc_s.so.1
b73d1000 8 - - - rw--- [ anon ]
b73d3000 20 - - - r-x-- libfontenc.so.1.0.0
b73d8000 4 - - - rw--- libfontenc.so.1.0.0
b73d9000 80 - - - r-x-- libz.so.1.2.5
b73ed000 4 - - - rw--- libz.so.1.2.5
b73ee000 516 - - - r-x-- libfreetype.so.6.6.2
b746f000 16 - - - rw--- libfreetype.so.6.6.2
b7473000 12 - - - r-x-- libgpg-error.so.0.7.0
b7476000 4 - - - rw--- libgpg-error.so.0.7.0
b7477000 1416 - - - r-x-- libc-2.14.so
b75d9000 8 - - - r---- libc-2.14.so
b75db000 4 - - - rw--- libc-2.14.so
b75dc000 16 - - - rw--- [ anon ]
b75e0000 28 - - - r-x-- librt-2.14.so
b75e7000 4 - - - r---- librt-2.14.so
b75e8000 4 - - - rw--- librt-2.14.so
b75e9000 160 - - - r-x-- libm-2.14.so
b7611000 4 - - - r---- libm-2.14.so
b7612000 4 - - - rw--- libm-2.14.so
b7613000 16 - - - r-x-- libXdmcp.so.6.0.0
b7617000 4 - - - rw--- libXdmcp.so.6.0.0
b7618000 8 - - - r-x-- libXau.so.6.0.0
b761a000 4 - - - rw--- libXau.so.6.0.0
b761b000 208 - - - r-x-- libXfont.so.1.4.1
b764f000 8 - - - rw--- libXfont.so.1.4.1
b7651000 504 - - - r-x-- libpixman-1.so.0.22.2
b76cf000 16 - - - rw--- libpixman-1.so.0.22.2
b76d3000 4 - - - rw--- [ anon ]
b76d4000 92 - - - r-x-- libpthread-2.14.so
b76eb000 4 - - - r---- libpthread-2.14.so
b76ec000 4 - - - rw--- libpthread-2.14.so
b76ed000 8 - - - rw--- [ anon ]
b76ef000 28 - - - r-x-- libpciaccess.so.0.10.8
b76f6000 4 - - - rw--- libpciaccess.so.0.10.8
b76f7000 12 - - - r-x-- libdl-2.14.so
b76fa000 4 - - - r---- libdl-2.14.so
b76fb000 4 - - - rw--- libdl-2.14.so
b76fc000 496 - - - r-x-- libgcrypt.so.11.6.0
b7778000 12 - - - rw--- libgcrypt.so.11.6.0
b777b000 56 - - - r-x-- libudev.so.0.11.5
b7789000 4 - - - rw--- libudev.so.0.11.5
b778b000 20 - - - r-x-- libdbe.so
b7790000 4 - - - rw--- libdbe.so
b7791000 40 - - - r-x-- libdri.so
b779b000 4 - - - rw--- libdri.so
b779c000 12 - - - rw--- [ anon ]
b779f000 4 - - - r-x-- [ anon ]
b77a0000 124 - - - r-x-- ld-2.14.so
b77bf000 4 - - - r---- ld-2.14.so
b77c0000 4 - - - rw--- ld-2.14.so
bfc67000 132 - - - rw--- [ stack ]
-------- ------- ------- ------- -------
total kB 378024 - - -
Output of free -m:
total used free shared buffers cached
Mem: 499 490 9 0 2 90
-/+ buffers/cache: 397 102
Swap: 1906 227 1679
X is using about 38% of my RAM:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
[...]
root 27597 12.0 38.0 353732 194816 tty7 S<s+ 05:59 16:33 /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.YBIvl2ou2B
1-Crawl 2-Cnfg 3-ATF 4-Exit ?
Offline
I found that when I ran X on a fairly low memory system, it's memory use always started low and grew significantly to where I needed to restart it.
Now that I have a system with 4GB RAM, memory use for X is higher, but mostly constant.
I'm not sure what causes this, but it's just something I've noticed.
Offline
Pages: 1