You are not logged in.

#1 2014-05-27 18:35:32

beardedlinuxgeek
Member
Registered: 2012-09-17
Posts: 32
Website

Xorg memory leak?

X is using over 5GB of RAM on my system and most of that is active not just cache. Can I force X to flush RAM without exiting my environment? I don't want to have to reboot regularly. If it's relevant, I'm using Compiz and the AMD Catalyst drivers (though I killed compiz and X didn't release any RAM).

Memory usage

[colin@saturn ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          7972       7539        433         33         57        513
-/+ buffers/cache:       6967       1004
Swap:         3906       1111       2794

Top 10 processes by memory usage

[colin@saturn ~]$ while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 10)

COMMAND                   %MEM    RSS
X                         66.8    5329.08
java                      4.0     322.61
chromium                  2.0     162.24
chromium                  1.7     141.83
chromium                  1.3     109.90
mysqld                    1.1     91.51
chromium                  1.1     89.90
chromium                  1.0     79.84
chromium                  0.8     71.61
chromium                  0.5     47.70

Top 10 processes by CPU usage

[colin@saturn ~]$ ps aux | sort -rk 3,3 

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
colin 19475  7.1  4.0 4469636 332924 tty1   Sl   18:45   2:13 /opt/java/bin/java
colin 20773  3.4  1.7 1029912 145416 tty1   Sl   18:55   0:43 /usr/lib/chromium/chromium
root       530 30.0 66.8 6733340 5456984 ?     S<s  May22 2180:34 /usr/bin/X -nolisten tcp :0 -auth /tmp/serverauth.dGoqkjkyCK vt1
colin 21077  2.6  1.1 1116020 93940 tty1    Sl   18:57   0:32 /usr/lib/chromium/chromium
colin   588  2.2  0.5 367072 47516 tty1     Sl   May22 166:15 compiz --replace ccp &
colin   607  1.4  0.0 370080  5536 ?        S<l  May22 108:41 /usr/bin/pulseaudio --start
colin 20811  1.2  2.0 600504 166400 tty1    Sl   18:55   0:15 /usr/lib/chromium/chromium
colin 21394  0.7  1.0 1107068 81764 tty1    SNl  19:01   0:06 /usr/lib/chromium/chromium
colin 21024  0.5  0.8 1083744 73336 tty1    SNl  18:56   0:06 /usr/lib/chromium/chromium
colin 20863  0.5  1.3 1093540 111516 tty1   Sl   18:56   0:06 /usr/lib/chromium/chromium

Offline

#2 2014-05-27 18:46:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Xorg memory leak?

You can certainly restart X without rebooting.

There is another tool for identifying what is using X's memory (I'll look for it momentarily[1]) but this could be any client program misbehaving.  Client programs can allocate memory through the X Server (mostly for Pixmaps and the like) and this will show up in ps/top as belonging to X.


[1] EDIT: it's [community]/xrestop

Last edited by Trilby (2014-05-27 18:47:21)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-06-09 15:12:50

turboNOMAD
Member
From: Ukraine
Registered: 2009-09-06
Posts: 21

Re: Xorg memory leak?

I'm seeing the same problem with catalyst-test driver, version 14.6 beta.
Over 22 days of uptime X has eaten up 7553M of memory, as shown by htop.

Any solutions?

Offline

#4 2014-11-26 22:26:52

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: Xorg memory leak?

beardedlinuxgeek wrote:

Can I force X to flush RAM without exiting my environment?

Trilby wrote:

You can certainly restart X without rebooting.

Can X be flushed (or restarted/reloaded) without exiting the X session?

Having this problem too, although less severe, X steadily grows in memory usage over time, the culprit seems to Adobe Flash Player in my case. (Oh how I loath that piece of software.)

Edited to say that I think I remember some time ago when X used to crash that it would restart automatically and the session would be intact, so I think this is possible.

Last edited by JKAbrams (2014-11-26 22:35:37)

Offline

Board footer

Powered by FluxBB