LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-21-2010, 07:38 PM   #1
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Question Existeth a way to 'clear out' all the old/cached crap from RAM/SWAP to free up space?


Closest analogy I can compare what I want to, is like the `sync` command, which writes out all stuff in the disk buffers, freeing the buffers.

Instead of disk buffers, I want to 'clean out' my RAM and SWAP of any/all junk that's accumulated in there over the time my PC has been up. I've long wondered about this, but never asked, though I recall searching around several times..

When I first boot it cold and log in, the memory usage bar on my desktop is near zero, and the swap is empty. But after a week or 2 or 3 or more of uptime, and with Firefox always running with a dozen tabs or so at any given time, I end up with all the memory full or 'filled with cached stuff', and the swap space is filled to capacity.

Curiousity: I blame Firefox for leaking memory, but even if that's still the case today (historically it was) can this all be blamed on Firefox? Or what-all causes this, besides Firefox- just..Everything?

Here's current stats:
Code:
sasha@reactor: uptime
 21:21:42 up 30 days, 10:07,  3 users,  load average: 0.02, 0.05, 0.01
sasha@reactor: free
             total       used       free     shared    buffers     cached
Mem:       4057996    3857640     200356          0     235716     135092
-/+ buffers/cache:    3486832     571164
Swap:      1020088    1020088          0
So, 3.8 of 4 Gib of RAM is occupied, and the 1 Gib swap space is jammed full 100%. This must slow things down to some degree, yes? I mean, the kernel does have to keep track of this, right?

Of course closing all the applications doesn't make a difference (not an appreciable one anyhow) and the only way I have found to start fresh is to reboot.

Isn't there another way?

Thanks for your interest.

Last edited by GrapefruiTgirl; 07-22-2010 at 01:08 PM.
 
Old 07-21-2010, 07:57 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I think what you are looking for is "drop_caches". Won't buy you a lot in this case.
Swap like that smells of a leak. I would try a ps reverse sorted on rss, and start at the top. For swap, have a look at /proc/<pid>/smaps.

For in-depth analysis, try collectl (cue Marks entry from stage left ... )
 
Old 07-21-2010, 08:25 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Thanks for this, syg00 - I'll hafta have a look into this tomorrow (bed time now). The `ps` I can figure out (looking at that now though not sure what I'm seeing ) but I'll have to dig around about the collectl and drop_caches; no idea what they're about!
 
Old 07-21-2010, 08:40 PM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by GrapefruiTgirl View Post
I end up with all the memory full or 'filled with cached stuff', and the swap space is filled to capacity.
'filled with cached stuff' would be pretty normal and harmless. But that doesn't fit what you posted. It looks like a serious memory leak.

Quote:
closing all the applications doesn't make a difference
That is very surprising. Ordinary memory leaked by an application is recovered when the application is closed.

You suspected firefox. Did you close firefox?

Is this a 64-bit system? (So it would be possible for the kernel to leak this much memory).

If the kernel is leaking memory, you should be able to gather info about that with
Code:
cat /proc/slabinfo
I don't know enough about how things like inode caches work. That kind of memory use is reported inside /proc/slabinfo and I'm pretty sure is not included in the "cache" memory reported by free.

I don't know how (or even whether) caches that are kept in slab memory respond to overall system memory pressure. If they respond well, then what you're seeing might not be a memory leak. It might be just another form of memory being better used by caches than left unused. Even some swap use is plausible in that theory. But I think you have too much swap use, and too little ordinary cache. So even if the actual use is by something like an inode cache, I think it is functioning as a memory leak.

The key is to find out (with the highest rss values in top or ps and with /proc/slabinfo) what exactly is holding onto the memory. Then you can dig deeper to find out whether it is a memory leak and/or what to fix.

Last edited by johnsfine; 07-21-2010 at 09:13 PM.
 
Old 07-21-2010, 08:53 PM   #5
Zero Angel
Member
 
Registered: Jul 2010
Distribution: PinguyOS 12.04
Posts: 50

Rep: Reputation: 1
Here's an anomaly for you

On my PC, Ksysguard reports ~778MB used out of 3GB while free reports ~3GB used out of 3.1GB
Code:
[david@archangel macros.d]$ free
             total       used       free     shared    buffers     cached
Mem:       3111912    2975556     136356          0     570768    1636584
-/+ buffers/cache:     768204    2343708
Swap:            0          0          0
My theory?

Your system is probably demonstrating healthy behavior by making use of all available RAM for caching files and programs for faster use later on. Disk cache stuff will get pushed out of memory if your apps need it.

Flushing your disk cache would actually slow things down and all that extra memory you have would go to waste until the cache is refilled.

http://dl.dropbox.com/u/8825098/kinfocenter-mem.jpg

Last edited by Zero Angel; 07-21-2010 at 09:09 PM.
 
Old 07-21-2010, 09:01 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Zero Angel View Post
Your system is demonstrating healthy behavior, by making use of all available RAM for caching files and programs for faster use later on.
That is the usual answer for the commonly posted question that looks superficially like GrapefruiTgirl's question. But this time it's the wrong answer. Look more carefully at the output from free that GrapefruiTgirl posted.
 
Old 07-21-2010, 09:17 PM   #7
Zero Angel
Member
 
Registered: Jul 2010
Distribution: PinguyOS 12.04
Posts: 50

Rep: Reputation: 1
Good call. I wasnt reading so closely but now that you mention it...
Code:
-/+ buffers/cache:    3486832     571164
The first numbers should be MUCH lower.
 
Old 07-21-2010, 09:28 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
drop_caches is a sysctl - have a look in "man proc". collectl is a stand-alone tool - very handy.
For something simple try this
Code:
ps -eo pid,user,rss,comm --sort=-rss | head -n 10
 
Old 07-22-2010, 09:48 AM   #9
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
Originally Posted by johnsfine View Post
...Ordinary memory leaked by an application is recovered when the application is closed.

You suspected firefox. Did you close firefox?
Yep, closing Firefox frees a relatively small amount, nothing even close to a large portion of the occupied memory.
Quote:
Is this a 64-bit system? (So it would be possible for the kernel to leak this much memory).
Yes it is 64bit - Slack64.
Quote:
If the kernel is leaking memory, you should be able to gather info about that with
Code:
cat /proc/slabinfo
I'll examine that further on and post findings.
 
Old 07-22-2010, 10:01 AM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
Originally Posted by syg00 View Post
For something simple try this
Code:
ps -eo pid,user,rss,comm --sort=-rss | head -n 10
And here's what I get from that:

Code:
root@reactor: 
root@reactor: ps -eo pid,user,rss,comm --sort=-rss | head -n 10
  PID USER       RSS COMMAND
  818 root     2612052 X
26485 sasha    333224 firefox-bin
  823 sasha    288020 i3
 5188 sasha    53236 kwrite
14653 root     15696 kded4
17739 sasha    11040 kmix
14650 root      9260 klauncher
18837 sasha     8176 kio_file
14648 root      7696 kdeinit4
root@reactor:
Even though I don't (yet) know what this "RSS" (I'll look it up) is, if it's something that means those numbers will shrink or disappear when I close 'applications', it would appear that I stand to recover the most by killing X, which I will test shortly. (Maybe the nVidia driver contributes to that? Or maybe just X all by itself..)

And following X, of course, is Firefox, followed by my window manager, i3, followed by a bunch of KDE stuff; although the only KDE item I ever use is Kwrite (EDIT: and Kmix), it/they evidently starts up a load of KDE daemons/processes after being started, and they never subsequently go away unless forcefully stopped..

FWIW, to date the only thing I have ever had in my sysctl.conf that relates to memory (AFAIK), is vm.swappiness=50. Here's the file:
Code:
root@reactor: cat /etc/sysctl.conf
# proc/sys things which can be adjusted/tuned using sysctl.
# Default swappiness in general is apparently 60.
# Lower number (10) should make desktop more responsive.
vm.swappiness=50
kernel.core_pattern=core.%e.%p

root@reactor:
I'll post again after researching the 'collectl' and 'drop_caches' to see if there's anything to be played with in that regard, and eventually try logging out (to kill X and see what effect that has).

Thanks for the input so far you guys.

Last edited by GrapefruiTgirl; 07-22-2010 at 10:16 AM.
 
Old 07-22-2010, 11:25 AM   #11
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I've used the following:
Code:
#!/bin/dash

for pids in $(ps -eo pid,user,rss,comm --sort=-rss --no-headers | head -n 10 | awk '{print $1}'); do

   files=/proc/$pids/smaps
   echo
   echo "###### File: $files  ( Process: $(ps -p $(echo "$files" | cut -f3 -d/) -o comm= 2>/dev/null) ) ######"
   echo
   cat /proc/$pids/smaps | grep -- '-\|Rss\|Swap' | sed '/^.* 0 kB/d'
   echo

done | less
To scan the top 10 /proc/<pid>/smaps files of the processes outputted by that `ps --sort rss` command, and print the parent process-name, subprocesses/libraries, and Rss/Swap values. I've sedded out any 0kB lines just to reduce the total lines output. The results are some 4100+ lines just for these top 10 processes, but here's a sample of a process (Xorg) with some particularly large values (of course - X was the first process outputted by `ps`):

Code:
####### File: /proc/818/smaps  ( Process: X ) #######
00400000-005b7000 r-xp 00000000 03:0b 24610                              /usr/bin/Xorg
Rss:                 848 kB
007b6000-007c4000 rw-p 001b6000 03:0b 24610                              /usr/bin/Xorg
Rss:                  40 kB
Swap:                  8 kB
007c4000-007d4000 rw-p 00000000 00:00 0 
Rss:                  56 kB
0099e000-304a1000 rw-p 00000000 00:00 0                                  [heap]
Rss:              766348 kB
Swap:              13912 kB
40251000-40253000 rwxp 00000000 00:05 226                                /dev/zero
Swap:                  8 kB
7f15b438b000-7f15bdde9000 rw-p 00000000 00:00 0 
Rss:              116436 kB
Swap:              41636 kB
7f15c6a9a000-7f15d81be000 rw-p 00000000 00:00 0 
Rss:              193980 kB
Swap:              91860 kB
7f15e1ea1000-7f15f35c5000 rw-p 00000000 00:00 0 
Rss:              193872 kB
Swap:              91968 kB
7f15f77cc000-7f1608ef0000 rw-p 00000000 00:00 0 
Rss:              194108 kB
Swap:              91732 kB
7f160bc31000-7f161d355000 rw-p 00000000 00:00 0 
Rss:              194428 kB
Swap:              91412 kB
7f16236fe000-7f162d15c000 rw-p 00000000 00:00 0 
Rss:              106836 kB
Swap:              51236 kB
7f162f621000-7f163907f000 rw-p 00000000 00:00 0 
Rss:              107124 kB
Swap:              50948 kB
7f1639fb7000-7f1643a15000 rw-p 00000000 00:00 0 
Rss:              107796 kB
Swap:              50276 kB
7f1645ecf000-7f164f92d000 rw-p 00000000 00:00 0 
Rss:              128004 kB
Swap:              30068 kB
7f165496b000-7f166608f000 rw-p 00000000 00:00 0 
Rss:              193796 kB
Swap:              92044 kB
7f166a1d7000-7f167b8fb000 rw-p 00000000 00:00 0 
Rss:              193880 kB
Swap:              91960 kB
7f167d031000-7f1686a8f000 rw-p 00000000 00:00 0 
Rss:              115392 kB
Swap:              42680 kB
7f168cfd5000-7f168d035000 rw-s 00000000 00:04 34930690                   /SYSV00000000 (deleted)
Rss:                 240 kB
7f168fa37000-7f1690138000 rw-s d1345000 00:05 3659                       /dev/nvidia1
7f1690138000-7f1691c24000 rw-p 00000000 00:00 0 
Swap:              27568 kB
7f169200c000-7f169270c000 rw-s c1400000 00:05 3643                       /dev/nvidia0
7f169270c000-7f1692e0d000 rw-s d0845000 00:05 3659                       /dev/nvidia1
7f1692e0d000-7f169350e000 rw-s c087d000 00:05 3643                       /dev/nvidia0
7f169350e000-7f169360f000 rw-s d0745000 00:05 3659                       /dev/nvidia1
7f169360f000-7f1693710000 rw-s c077d000 00:05 3643                       /dev/nvidia0
7f1693710000-7f1693e3e000 rw-s d0000000 00:05 3659                       /dev/nvidia1
7f1693e3e000-7f1694025000 rw-p 00000000 00:00 0 
Rss:                 356 kB
Swap:               1592 kB
7f1694025000-7f1694753000 rw-s c0000000 00:05 3643                       /dev/nvidia0
7f1694753000-7f169477d000 r-xp 00000000 03:0b 261577                     /usr/lib64/xorg/modules/libwfb.so
7f169477d000-7f169497c000 ---p 0002a000 03:0b 261577                     /usr/lib64/xorg/modules/libwfb.so
7f169497c000-7f169497d000 rw-p 00029000 03:0b 261577                     /usr/lib64/xorg/modules/libwfb.so
Swap:                  4 kB
7f169497d000-7f169499d000 r-xp 00000000 03:0b 261571                     /usr/lib64/xorg/modules/libfb.so
Rss:                  88 kB
7f169499d000-7f1694b9d000 ---p 00020000 03:0b 261571                     /usr/lib64/xorg/modules/libfb.so
7f1694b9d000-7f1694b9e000 rw-p 00020000 03:0b 261571                     /usr/lib64/xorg/modules/libfb.so
Rss:                   4 kB
7f1694b9e000-7f1694ba9000 r-xp 00000000 03:0b 521249                     /usr/lib64/xorg/modules/input/mouse_drv.so
Rss:                  32 kB
7f1694ba9000-7f1694da9000 ---p 0000b000 03:0b 521249                     /usr/lib64/xorg/modules/input/mouse_drv.so
7f1694da9000-7f1694dab000 rw-p 0000b000 03:0b 521249                     /usr/lib64/xorg/modules/input/mouse_drv.so
Rss:                   8 kB
7f1694dab000-7f1694db0000 r-xp 00000000 03:0b 521223                     /usr/lib64/xorg/modules/input/kbd_drv.so
Rss:                  16 kB
7f1694db0000-7f1694fb0000 ---p 00005000 03:0b 521223                     /usr/lib64/xorg/modules/input/kbd_drv.so
7f1694fb0000-7f1694fb2000 rw-p 00005000 03:0b 521223                     /usr/lib64/xorg/modules/input/kbd_drv.so
Rss:                   4 kB
Swap:                  4 kB
7f1694fb2000-7f169539a000 r-xp 00000000 03:0b 521257                     /usr/lib64/xorg/modules/drivers/nvidia_drv.so
Rss:                 744 kB
7f169539a000-7f1695499000 ---p 003e8000 03:0b 521257                     /usr/lib64/xorg/modules/drivers/nvidia_drv.so
7f1695499000-7f16954fe000 rw-p 003e7000 03:0b 521257                     /usr/lib64/xorg/modules/drivers/nvidia_drv.so
Rss:                  44 kB
Swap:                 56 kB
7f16954fe000-7f169552e000 rw-p 00000000 00:00 0 
Rss:                  48 kB
Swap:                 44 kB
7f169552e000-7f1695531000 r-xp 00000000 03:0b 521254                     /usr/lib64/xorg/modules/extensions/libdri2.so
7f1695531000-7f1695730000 ---p 00003000 03:0b 521254                     /usr/lib64/xorg/modules/extensions/libdri2.so
7f1695730000-7f1695731000 rw-p 00002000 03:0b 521254                     /usr/lib64/xorg/modules/extensions/libdri2.so
Rss:                   4 kB
7f1695731000-7f169573b000 r-xp 00000000 03:0b 81764                      /usr/lib64/libdrm.so.2.4.0 (deleted)
7f169573b000-7f169593a000 ---p 0000a000 03:0b 81764                      /usr/lib64/libdrm.so.2.4.0 (deleted)
7f169593a000-7f169593b000 rw-p 00009000 03:0b 81764                      /usr/lib64/libdrm.so.2.4.0 (deleted)
Rss:                   4 kB
7f169593b000-7f1695944000 r-xp 00000000 03:0b 521259                     /usr/lib64/xorg/modules/extensions/libdri.so
7f1695944000-7f1695b44000 ---p 00009000 03:0b 521259                     /usr/lib64/xorg/modules/extensions/libdri.so
7f1695b44000-7f1695b45000 rw-p 00009000 03:0b 521259                     /usr/lib64/xorg/modules/extensions/libdri.so
Rss:                   4 kB
7f1695b45000-7f1696a66000 r-xp 00000000 03:0b 1982                       /usr/lib64/libGLcore.so.190.53
Rss:                  40 kB
7f1696a66000-7f1696b65000 ---p 00f21000 03:0b 1982                       /usr/lib64/libGLcore.so.190.53
7f1696b65000-7f1697001000 rwxp 00f20000 03:0b 1982                       /usr/lib64/libGLcore.so.190.53
Rss:                  36 kB
Swap:               3792 kB
7f1697001000-7f1697015000 rwxp 00000000 00:00 0 
Rss:                  24 kB
Swap:                 52 kB
7f1697015000-7f1697251000 r-xp 00000000 03:0b 521221                     /usr/lib64/xorg/modules/extensions/libglx.so.190.53
Rss:                  76 kB
7f1697251000-7f1697350000 ---p 0023c000 03:0b 521221                     /usr/lib64/xorg/modules/extensions/libglx.so.190.53
7f1697350000-7f169741b000 rwxp 0023b000 03:0b 521221                     /usr/lib64/xorg/modules/extensions/libglx.so.190.53
Rss:                  16 kB
Swap:                576 kB
7f169741b000-7f169741d000 rwxp 00000000 00:00 0 
Rss:                   4 kB
7f169741d000-7f1697421000 r-xp 00000000 03:0b 521255                     /usr/lib64/xorg/modules/extensions/libdbe.so
7f1697421000-7f1697620000 ---p 00004000 03:0b 521255                     /usr/lib64/xorg/modules/extensions/libdbe.so
7f1697620000-7f1697621000 rw-p 00003000 03:0b 521255                     /usr/lib64/xorg/modules/extensions/libdbe.so
Rss:                   4 kB
7f1697621000-7f1697639000 r-xp 00000000 03:0b 521256                     /usr/lib64/xorg/modules/extensions/libextmod.so
Rss:                  48 kB
7f1697639000-7f1697839000 ---p 00018000 03:0b 521256                     /usr/lib64/xorg/modules/extensions/libextmod.so
7f1697839000-7f169783a000 rw-p 00018000 03:0b 521256                     /usr/lib64/xorg/modules/extensions/libextmod.so
Rss:                   4 kB
7f169783a000-7f169783e000 r-xp 00000000 03:0b 521224                     /usr/lib64/xorg/modules/linux/libfbdevhw.so
7f169783e000-7f1697a3d000 ---p 00004000 03:0b 521224                     /usr/lib64/xorg/modules/linux/libfbdevhw.so
7f1697a3d000-7f1697a3e000 rw-p 00003000 03:0b 521224                     /usr/lib64/xorg/modules/linux/libfbdevhw.so
Rss:                   4 kB
7f1697a3e000-7f1697a41000 r-xp 00000000 03:0b 30647                      /lib64/libuuid.so.1.3.0
7f1697a41000-7f1697c40000 ---p 00003000 03:0b 30647                      /lib64/libuuid.so.1.3.0
7f1697c40000-7f1697c41000 rw-p 00002000 03:0b 30647                      /lib64/libuuid.so.1.3.0
Swap:                  4 kB
7f1697c41000-7f1697c59000 r-xp 00000000 03:0b 37364                      /lib64/libpthread-2.11.1.so
Rss:                  48 kB
7f1697c59000-7f1697e58000 ---p 00018000 03:0b 37364                      /lib64/libpthread-2.11.1.so
7f1697e58000-7f1697e59000 r--p 00017000 03:0b 37364                      /lib64/libpthread-2.11.1.so
Rss:                   4 kB
7f1697e59000-7f1697e5a000 rw-p 00018000 03:0b 37364                      /lib64/libpthread-2.11.1.so
Swap:                  4 kB
7f1697e5a000-7f1697e5e000 rw-p 00000000 00:00 0 
Swap:                  4 kB
7f1697e5e000-7f1697e72000 r-xp 00000000 03:0b 87654                      /usr/lib64/libz.so.1.2.3
Rss:                  32 kB
7f1697e72000-7f1698071000 ---p 00014000 03:0b 87654                      /usr/lib64/libz.so.1.2.3
7f1698071000-7f1698072000 rw-p 00013000 03:0b 87654                      /usr/lib64/libz.so.1.2.3
Rss:                   4 kB
7f1698072000-7f16980f3000 r-xp 00000000 03:0b 87646                      /usr/lib64/libfreetype.so.6.4.0
7f16980f3000-7f16982f2000 ---p 00081000 03:0b 87646                      /usr/lib64/libfreetype.so.6.4.0
7f16982f2000-7f16982f8000 rw-p 00080000 03:0b 87646                      /usr/lib64/libfreetype.so.6.4.0
Swap:                 24 kB
7f16982f8000-7f1698463000 r-xp 00000000 03:0b 29500                      /lib64/libc-2.11.1.so
Rss:                 520 kB
7f1698463000-7f1698663000 ---p 0016b000 03:0b 29500                      /lib64/libc-2.11.1.so
7f1698663000-7f1698667000 r--p 0016b000 03:0b 29500                      /lib64/libc-2.11.1.so
Rss:                  12 kB
Swap:                  4 kB
7f1698667000-7f1698668000 rw-p 0016f000 03:0b 29500                      /lib64/libc-2.11.1.so
Rss:                   4 kB
7f1698668000-7f169866d000 rw-p 00000000 00:00 0 
Rss:                  12 kB
Swap:                  4 kB
7f169866d000-7f1698674000 r-xp 00000000 03:0b 37400                      /lib64/librt-2.11.1.so
Rss:                  16 kB
7f1698674000-7f1698873000 ---p 00007000 03:0b 37400                      /lib64/librt-2.11.1.so
7f1698873000-7f1698874000 r--p 00006000 03:0b 37400                      /lib64/librt-2.11.1.so
Rss:                   4 kB
7f1698874000-7f1698875000 rw-p 00007000 03:0b 37400                      /lib64/librt-2.11.1.so
Swap:                  4 kB
7f1698875000-7f1698877000 r-xp 00000000 03:0b 37330                      /lib64/libdl-2.11.1.so
Rss:                   4 kB
7f1698877000-7f1698a77000 ---p 00002000 03:0b 37330                      /lib64/libdl-2.11.1.so
7f1698a77000-7f1698a78000 r--p 00002000 03:0b 37330                      /lib64/libdl-2.11.1.so
Swap:                  4 kB
7f1698a78000-7f1698a79000 rw-p 00003000 03:0b 37330                      /lib64/libdl-2.11.1.so
Swap:                  4 kB
7f1698a79000-7f1698afb000 r-xp 00000000 03:0b 37331                      /lib64/libm-2.11.1.so
Rss:                 132 kB
7f1698afb000-7f1698cfa000 ---p 00082000 03:0b 37331                      /lib64/libm-2.11.1.so
7f1698cfa000-7f1698cfb000 r--p 00081000 03:0b 37331                      /lib64/libm-2.11.1.so
Rss:                   4 kB
7f1698cfb000-7f1698cfc000 rw-p 00082000 03:0b 37331                      /lib64/libm-2.11.1.so
Rss:                   4 kB
7f1698cfc000-7f1698e59000 r-xp 00000000 03:0b 28136                      /lib64/libcrypto.so.0.9.8
Rss:                  24 kB
7f1698e59000-7f1699058000 ---p 0015d000 03:0b 28136                      /lib64/libcrypto.so.0.9.8
7f1699058000-7f169907d000 rw-p 0015c000 03:0b 28136                      /lib64/libcrypto.so.0.9.8
Rss:                   4 kB
Swap:                144 kB
7f169907d000-7f1699081000 rw-p 00000000 00:00 0 
7f1699081000-7f16990cc000 r-xp 00000000 03:0b 28137                      /lib64/libssl.so.0.9.8
7f16990cc000-7f16992cb000 ---p 0004b000 03:0b 28137                      /lib64/libssl.so.0.9.8
7f16992cb000-7f16992d2000 rw-p 0004a000 03:0b 28137                      /lib64/libssl.so.0.9.8
Swap:                 28 kB
7f16992d2000-7f16992d7000 r-xp 00000000 03:0b 17907                      /usr/lib64/libXdmcp.so.6.0.0
Rss:                   8 kB
7f16992d7000-7f16994d6000 ---p 00005000 03:0b 17907                      /usr/lib64/libXdmcp.so.6.0.0
7f16994d6000-7f16994d7000 rw-p 00004000 03:0b 17907                      /usr/lib64/libXdmcp.so.6.0.0
Swap:                  4 kB
7f16994d7000-7f1699515000 r-xp 00000000 03:0b 22629                      /usr/lib64/libdbus-1.so.3.4.0
Rss:                 156 kB
7f1699515000-7f1699714000 ---p 0003e000 03:0b 22629                      /usr/lib64/libdbus-1.so.3.4.0
7f1699714000-7f1699716000 rw-p 0003d000 03:0b 22629                      /usr/lib64/libdbus-1.so.3.4.0
Rss:                   8 kB
7f1699716000-7f1699725000 r-xp 00000000 03:0b 74296                      /usr/lib64/libhal.so.1.0.0
Rss:                  24 kB
7f1699725000-7f1699925000 ---p 0000f000 03:0b 74296                      /usr/lib64/libhal.so.1.0.0
7f1699925000-7f1699926000 rw-p 0000f000 03:0b 74296                      /usr/lib64/libhal.so.1.0.0
Rss:                   4 kB
7f1699926000-7f169997b000 r-xp 00000000 03:0b 25498                      /usr/lib64/libpixman-1.so.0.16.6
Rss:                 156 kB
7f169997b000-7f1699b7b000 ---p 00055000 03:0b 25498                      /usr/lib64/libpixman-1.so.0.16.6
7f1699b7b000-7f1699b7e000 rw-p 00055000 03:0b 25498                      /usr/lib64/libpixman-1.so.0.16.6
Rss:                  12 kB
7f1699b7e000-7f1699b83000 r-xp 00000000 03:0b 2996                       /usr/lib64/libfontenc.so.1.0.0
7f1699b83000-7f1699d83000 ---p 00005000 03:0b 2996                       /usr/lib64/libfontenc.so.1.0.0
7f1699d83000-7f1699d85000 rw-p 00005000 03:0b 2996                       /usr/lib64/libfontenc.so.1.0.0
Rss:                   4 kB
Swap:                  4 kB
7f1699d85000-7f1699d87000 r-xp 00000000 03:0b 17480                      /usr/lib64/libXau.so.6.0.0
Rss:                   8 kB
7f1699d87000-7f1699f87000 ---p 00002000 03:0b 17480                      /usr/lib64/libXau.so.6.0.0
7f1699f87000-7f1699f88000 rw-p 00002000 03:0b 17480                      /usr/lib64/libXau.so.6.0.0
Rss:                   4 kB
7f1699f88000-7f1699fc1000 r-xp 00000000 03:0b 2943                       /usr/lib64/libXfont.so.1.4.1
Rss:                  92 kB
7f1699fc1000-7f169a1c1000 ---p 00039000 03:0b 2943                       /usr/lib64/libXfont.so.1.4.1
7f169a1c1000-7f169a1c3000 rw-p 00039000 03:0b 2943                       /usr/lib64/libXfont.so.1.4.1
Rss:                   8 kB
7f169a1c3000-7f169a1c4000 rw-p 00000000 00:00 0 
Rss:                   4 kB
7f169a1c4000-7f169a1cb000 r-xp 00000000 03:0b 18423                      /usr/lib64/libpciaccess.so.0.10.8
Rss:                  16 kB
7f169a1cb000-7f169a3cb000 ---p 00007000 03:0b 18423                      /usr/lib64/libpciaccess.so.0.10.8
7f169a3cb000-7f169a3cc000 rw-p 00007000 03:0b 18423                      /usr/lib64/libpciaccess.so.0.10.8
Rss:                   4 kB
7f169a3cc000-7f169a3ec000 r-xp 00000000 03:0b 37591                      /lib64/ld-2.11.1.so
Rss:                 104 kB
7f169a3ef000-7f169a44f000 rw-s 00000000 00:04 34865153                   /SYSV00000000 (deleted)
Rss:                 192 kB
7f169a44f000-7f169a450000 rw-s fdc01000 00:05 3659                       /dev/nvidia1
7f169a450000-7f169a451000 rw-s bf96f000 00:05 3659                       /dev/nvidia1
Rss:                   4 kB
7f169a451000-7f169a461000 rw-s 546df000 00:05 3659                       /dev/nvidia1
Rss:                  64 kB
7f169a461000-7f169a462000 rw-s fd001000 00:05 3659                       /dev/nvidia1
7f169a462000-7f169a463000 rw-s fbc01000 00:05 3643                       /dev/nvidia0
7f169a463000-7f169a464000 rw-s fd001000 00:05 3659                       /dev/nvidia1
7f169a464000-7f169a474000 rw-s 134558000 00:05 3659                      /dev/nvidia1
Rss:                  64 kB
7f169a474000-7f169a475000 rw-s 134556000 00:05 3659                      /dev/nvidia1
Rss:                   4 kB
7f169a475000-7f169a476000 rw-s fdc00000 00:05 3659                       /dev/nvidia1
7f169a476000-7f169a486000 rw-s 13452d000 00:05 3659                      /dev/nvidia1
Rss:                  64 kB
7f169a486000-7f169a487000 rw-s 9b55c000 00:05 3643                       /dev/nvidia0
Rss:                   4 kB
7f169a487000-7f169a497000 rw-s 54493000 00:05 3643                       /dev/nvidia0
Rss:                  64 kB
7f169a497000-7f169a498000 rw-s fb001000 00:05 3643                       /dev/nvidia0
7f169a498000-7f169a499000 rw-s fd680000 00:05 3659                       /dev/nvidia1
7f169a499000-7f169a4ba000 rw-s 00000000 00:04 0                          /SYSV00000000 (deleted)
Rss:                  16 kB
7f169a4ba000-7f169a4bb000 r-xp 00000000 03:0b 22094                      /usr/lib64/tls/libnvidia-tls.so.190.53
7f169a4bb000-7f169a5bb000 ---p 00001000 03:0b 22094                      /usr/lib64/tls/libnvidia-tls.so.190.53
7f169a5bb000-7f169a5bc000 rw-p 00001000 03:0b 22094                      /usr/lib64/tls/libnvidia-tls.so.190.53
Rss:                   4 kB
7f169a5bc000-7f169a5c2000 rw-p 00000000 00:00 0 
Rss:                   8 kB
Swap:                 16 kB
7f169a5c2000-7f169a5c3000 rw-s fb680000 00:05 3643                       /dev/nvidia0
7f169a5c3000-7f169a5c4000 rw-s fb001000 00:05 3643                       /dev/nvidia0
7f169a5c4000-7f169a5d4000 rw-s 1354d5000 00:05 3643                      /dev/nvidia0
Rss:                  64 kB
7f169a5d4000-7f169a5d5000 rw-s 1354d4000 00:05 3643                      /dev/nvidia0
Rss:                   4 kB
7f169a5d5000-7f169a5d6000 rw-s fbc00000 00:05 3643                       /dev/nvidia0
7f169a5d6000-7f169a5e6000 rw-s 1354c3000 00:05 3643                      /dev/nvidia0
Rss:                  64 kB
7f169a5e6000-7f169a5eb000 rw-p 00000000 00:00 0 
Rss:                   8 kB
Swap:                 12 kB
7f169a5eb000-7f169a5ec000 r--p 0001f000 03:0b 37591                      /lib64/ld-2.11.1.so
Rss:                   4 kB
7f169a5ec000-7f169a5ed000 rw-p 00020000 03:0b 37591                      /lib64/ld-2.11.1.so
Rss:                   4 kB
7f169a5ed000-7f169a5ee000 rw-p 00000000 00:00 0 
Swap:                  4 kB
7fffeeb5a000-7fffeeb7a000 rwxp 00000000 00:00 0                          [stack]
Rss:                  44 kB
Swap:                 84 kB
7fffeeb7a000-7fffeeb7b000 rw-p 00000000 00:00 0 
Rss:                   4 kB
7fffeebff000-7fffeec00000 r-xp 00000000 00:00 0                          [vdso]
Rss:                   4 kB
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
So, I dunno if this really proves anything we don't already know by looking at the `ps` output in Post#10 above, except to break down the Xorg process and see "what about X" is consuming the most resources (and keep me occupied for a while).
Note that a lot of the sub-processes don't even show what they are by name, only by that "7f15c6a9a000-7f15d8216000 rw-p 00000000 00:00 0" identifier, whatever that is..

This is all I've done since post#10, so still hafta look into that other sysctl stuff. More later.

Last edited by GrapefruiTgirl; 07-22-2010 at 11:27 AM.
 
Old 07-22-2010, 12:54 PM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Next thing tried:

Looked up vm.drop_caches via Google and got this: http://www.linuxinsight.com/proc_sys...op_caches.html

So per that page, I did a `sync` and then echoed "3" into /proc/sys/vm/drop_caches and the result on RAM was similar to as if I had closed Firefox (tiny bit of RAM freed), and swap remains unchanged:
Code:
root@reactor: echo 3 > /proc/sys/vm/drop_caches
root@reactor: free
             total       used       free     shared    buffers     cached
Mem:       4057996    3617432     440564          0       4384      55544
-/+ buffers/cache:    3557504     500492
Swap:      1020088    1020088          0
root@reactor:
Next I'll be logging out & back in (and/or if necessary, going to init1 and back again) and following that, rebooting if RAM is still full. Then later on, I'll look up `collectl`
 
Old 07-22-2010, 01:08 PM   #13
Zero Angel
Member
 
Registered: Jul 2010
Distribution: PinguyOS 12.04
Posts: 50

Rep: Reputation: 1
As an intermediate step, how about simply restarting Xorg?
 
Old 07-22-2010, 01:10 PM   #14
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
Originally Posted by Zero Angel View Post
As an intermediate step, how about simply restarting Xorg?
Yup, that's why I'll be logging out, since X can't much be restarted while I'm logged into it.

Will post the `free` after I do that - first gotta look around and see what I've got running on some other desktops so I know what was going on before I log out, so I can get them going again after logging back in.
 
Old 07-22-2010, 02:11 PM   #15
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by GrapefruiTgirl View Post
Yup, that's why I'll be logging out, since X can't much be restarted while I'm logged into it.
If you haven't logged out yet it might be interesting to copy /proc/slabinfo to some file before restarting X and to a different file after restarting X and see how those two files compare.

The info you have posted makes it look like Xorg is most of the problem, but not all of the problem. So I'm wondering whether the rest of the problem is some kernel memory use that Xorg causes. Hopefully kernel memory uses associated with Xorg would go away when Xorg does.

Last edited by johnsfine; 07-22-2010 at 02:13 PM.
 
  


Reply

Tags
clean, empty, full, ram, swap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAM utility to monitor and free memory jrbuergel Linux - Newbie 5 03-27-2007 11:19 PM
free() does not clear memory space in LINUX xinminhua Programming 32 08-18-2006 03:43 PM
howto free ram memory pingvina Linux - General 3 08-07-2006 01:52 PM
Clear Free Memory lowlifeish Linux - General 3 12-12-2005 12:12 PM
How to clear cached commands Kedelfor Linux - Newbie 1 01-20-2004 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration