Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google site



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-21-2009
Registered User
 

Join Date: Mar 2009
Posts: 137
Where does the memory go?

I've been running a bit low on memory recently, so I decided to find out where it's going. Obviously my browser is pretty memory-intensive, but I'm not sure there's much I can do about that (short of browsing less, all I can do is tune settings and/or change browsers). So I opened the system monitor and closed out the biggest memory users: firefox, soffice.bin, evolution*, and evince (I had a decent-sized PDF open). After closing those the memory use came down a bit: the largest memory users remaining were nautilus and gedit at 16 and 10 MB, respectively; everything else was taking a very small amount of RAM.

But the total memory use was still above 800 MiB: I calculated 810-812 MB not accounted for in the system monitor. The system monitor helpfully reported: "51% in use from programs, 11% for the cache" or something similar. Why is memory use so high? Vista only requires 512 MB; I have trouble believing that Ubuntu is greedier.

So I guess my questions come down to:
1. What is using the remaining 800 MB?
2. How can I reasonably conserve memory?
3. How long before someone tells me to buy another 2GB?

* Why was evolution running in the first place? I don't use it and I've never opened it.
Sponsored Links
  #2 (permalink)  
Old 06-21-2009
Read Only
 

Join Date: May 2008
Location: Philadelphia, PA, USA
Posts: 118
Quote:
Originally Posted by CRGreathouse View Post
I've been running a bit low on memory recently, so I decided to find out where it's going. Obviously my browser is pretty memory-intensive, but I'm not sure there's much I can do about that (short of browsing less, all I can do is tune settings and/or change browsers). So I opened the system monitor and closed out the biggest memory users: firefox, soffice.bin, evolution*, and evince (I had a decent-sized PDF open). After closing those the memory use came down a bit: the largest memory users remaining were nautilus and gedit at 16 and 10 MB, respectively; everything else was taking a very small amount of RAM.
Most (some) UNIX systems will fill memory intentionally. This is done to prevent paging as much as possible. Unless your disk is thrashing, I see no real problem here. (You haven't told us how much memory you have though.)

Quote:
But the total memory use was still above 800 MiB: I calculated 810-812 MB not accounted for in the system monitor. The system monitor helpfully reported: "51% in use from programs, 11% for the cache" or something similar. Why is memory use so high? Vista only requires 512 MB; I have trouble believing that Ubuntu is greedier.

So I guess my questions come down to:
1. What is using the remaining 800 MB?
2. How can I reasonably conserve memory?
3. How long before someone tells me to buy another 2GB?

* Why was evolution running in the first place? I don't use it and I've never opened it.
Autostart at login? Check your session startup list.
  #3 (permalink)  
Old 06-21-2009
Registered User
 

Join Date: Mar 2009
Posts: 137
Quote:
Originally Posted by glen.barber View Post
Most (some) UNIX systems will fill memory intentionally. This is done to prevent paging as much as possible. Unless your disk is thrashing, I see no real problem here. (You haven't told us how much memory you have though.)
I only posted because it had been thrashing. (Now that it's under the limit there's no problem, but I suspect that when I go over again it will do the same.) I identified this by
1. A marked slowdown in all processes
2. Hard drive sound
3. The yellow virtual memory meter (I have the system monitor in my panel) spiked up, where it had previously (hours or days) been flat

I have 2 GB of memory.
  #4 (permalink)  
Old 06-21-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 7,403
See this post on Linux memory:

Free Linux Memory by Dropping Caches
  #5 (permalink)  
Old 07-03-2009
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 2,461
Quote:
Originally Posted by CRGreathouse View Post
I've been running a bit low on memory recently, so I decided to find out where it's going. Obviously my browser is pretty memory-intensive, but I'm not sure there's much I can do about that (short of browsing less, all I can do is tune settings and/or change browsers). So I opened the system monitor and closed out the biggest memory users: firefox, soffice.bin, evolution*, and evince (I had a decent-sized PDF open). After closing those the memory use came down a bit: the largest memory users remaining were nautilus and gedit at 16 and 10 MB, respectively; everything else was taking a very small amount of RAM.
Instead of 'system monitor', whatever that is, try standard UNIX tools like ps. pastebinning the outputs of 'ps aux' would be informative.
  #6 (permalink)  
Old 07-07-2009
Registered User
 

Join Date: Mar 2009
Posts: 137
Quote:
Originally Posted by Corona688 View Post
Instead of 'system monitor', whatever that is, try standard UNIX tools like ps. pastebinning the outputs of 'ps aux' would be informative.
By system monitor I mean the application gnome-system-monitor.

My problem is somewhat decreased by buying up to 4 GB of RAM, but as that's currently full (albeit no performance hit yet) I'll give the output requested:

Code:
user@computer:~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   4104   364 ?        Ss   Jul04   0:00 /sbin/init
root         2  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S<   Jul04   0:01 [migration/0]
root         4  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   Jul04   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S<   Jul04   0:01 [migration/1]
root         7  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksoftirqd/1]
root         8  0.0  0.0      0     0 ?        S<   Jul04   0:00 [watchdog/1]
root         9  0.0  0.0      0     0 ?        S<   Jul04   0:01 [migration/2]
root        10  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksoftirqd/2]
root        11  0.0  0.0      0     0 ?        S<   Jul04   0:00 [watchdog/2]
root        12  0.0  0.0      0     0 ?        S<   Jul04   0:01 [migration/3]
root        13  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksoftirqd/3]
root        14  0.0  0.0      0     0 ?        S<   Jul04   0:00 [watchdog/3]
root        15  0.0  0.0      0     0 ?        S<   Jul04   0:00 [events/0]
root        16  0.0  0.0      0     0 ?        S<   Jul04   0:00 [events/1]
root        17  0.0  0.0      0     0 ?        S<   Jul04   0:00 [events/2]
root        18  0.0  0.0      0     0 ?        S<   Jul04   0:00 [events/3]
root        19  0.0  0.0      0     0 ?        S<   Jul04   0:00 [khelper]
root        20  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kstop/0]
root        21  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kstop/1]
root        22  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kstop/2]
root        23  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kstop/3]
root        24  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kintegrityd/0]
root        25  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kintegrityd/1]
root        26  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kintegrityd/2]
root        27  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kintegrityd/3]
root        28  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kblockd/0]
root        29  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kblockd/1]
root        30  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kblockd/2]
root        31  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kblockd/3]
root        32  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kacpid]
root        33  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kacpi_notify]
root        34  0.0  0.0      0     0 ?        S<   Jul04   0:00 [cqueue]
root        35  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ata/0]
root        36  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ata/1]
root        37  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ata/2]
root        38  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ata/3]
root        39  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ata_aux]
root        40  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksuspend_usbd]
root        41  0.0  0.0      0     0 ?        S<   Jul04   0:00 [khubd]
root        42  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kseriod]
root        43  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmmcd]
root        44  0.0  0.0      0     0 ?        S<   Jul04   0:00 [btaddconn]
root        45  0.0  0.0      0     0 ?        S<   Jul04   0:00 [btdelconn]
root        48  0.0  0.0      0     0 ?        S<   Jul04   0:05 [kswapd0]
root        49  0.0  0.0      0     0 ?        S<   Jul04   0:00 [aio/0]
root        50  0.0  0.0      0     0 ?        S<   Jul04   0:00 [aio/1]
root        51  0.0  0.0      0     0 ?        S<   Jul04   0:00 [aio/2]
root        52  0.0  0.0      0     0 ?        S<   Jul04   0:00 [aio/3]
root        53  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ecryptfs-kthr]
root        56  0.0  0.0      0     0 ?        S<   Jul04   0:00 [scsi_eh_0]
root        57  0.0  0.0      0     0 ?        S<   Jul04   0:06 [scsi_eh_1]
root        58  0.0  0.0      0     0 ?        S<   Jul04   0:00 [scsi_eh_2]
root        59  0.0  0.0      0     0 ?        S<   Jul04   0:00 [scsi_eh_3]
root        60  0.0  0.0      0     0 ?        S<   Jul04   0:00 [scsi_eh_4]
root        61  0.0  0.0      0     0 ?        S<   Jul04   0:00 [scsi_eh_5]
root        62  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kstriped]
root        63  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmpathd/0]
root        64  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmpathd/1]
root        65  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmpathd/2]
root        66  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmpathd/3]
root        67  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kmpath_handle]
root        68  0.0  0.0      0     0 ?        S<   Jul04   0:00 [ksnapd]
root        69  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kondemand/0]
root        70  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kondemand/1]
root        71  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kondemand/2]
root        72  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kondemand/3]
root        73  0.0  0.0      0     0 ?        S<   Jul04   0:00 [krfcommd]
root       380  0.0  0.0      0     0 ?        S<   Jul04   0:00 [khpsbpkt]
root       672  0.0  0.0      0     0 ?        S<   Jul04   0:00 [knodemgrd_0]
root       799  0.0  0.0      0     0 ?        S<   Jul04   0:14 [kjournald]
root       933  0.0  0.0  16788   184 ?        S<s  Jul04   0:00 /sbin/udevd --d
root      1629  0.0  0.0      0     0 ?        S<   Jul04   0:00 [kpsmoused]
root      2272  0.0  0.0   3944   240 tty4     Ss+  Jul04   0:00 /sbin/getty 384
root      2273  0.0  0.0   3944   240 tty5     Ss+  Jul04   0:00 /sbin/getty 384
root      2276  0.0  0.0   3944   240 tty2     Ss+  Jul04   0:00 /sbin/getty 384
root      2278  0.0  0.0   3944   240 tty3     Ss+  Jul04   0:00 /sbin/getty 384
root      2280  0.0  0.0   3944   240 tty6     Ss+  Jul04   0:00 /sbin/getty 384
root      2354  0.0  0.0   4604   240 ?        Ss   Jul04   0:00 /usr/sbin/acpid
syslog    2393  0.0  0.0  12376   460 ?        Ss   Jul04   0:01 /sbin/syslogd -
root      2416  0.0  0.0   8204   236 ?        S    Jul04   0:00 /bin/dd bs 1 if
klog      2418  0.0  0.0   7144   348 ?        Ss   Jul04   0:00 /sbin/klogd -P
108       2441  0.0  0.0  21720  1084 ?        Ss   Jul04   0:12 /bin/dbus-daemo
111       2599  0.0  0.0  36560  1848 ?        Ss   Jul04   0:08 /usr/sbin/hald
root      2602  0.0  0.0 107436  2624 ?        Ssl  Jul04   0:05 /usr/sbin/conso
root      2666  0.0  0.0  15816   756 ?        S    Jul04   0:00 hald-runner
root      2695  0.0  0.0  28484   544 ?        S    Jul04   0:00 hald-addon-inpu
root      2747  0.0  0.0  28484   688 ?        S    Jul04   0:09 hald-addon-stor
root      2748  0.0  0.0  28492   448 ?        S    Jul04   0:00 /usr/lib/hal/ha
111       2749  0.0  0.0  32392   372 ?        S    Jul04   0:00 hald-addon-acpi
root      2767  0.0  0.0  28356   528 ?        Ss   Jul04   0:00 /usr/sbin/bluet
root      2806  0.0  0.0 123136   428 ?        Ss   Jul04   0:00 /usr/sbin/gdm
root      2809  0.0  0.0 144164   804 ?        S    Jul04   0:00 /usr/sbin/gdm
root      2814  4.9 40.6 1927648 1414296 tty7  Rs+  Jul04 141:43 /usr/X11R6/bin/
root      2833  0.0  0.0  36676   388 ?        Ss   Jul04   0:02 /usr/sbin/atiev
root      2865  0.0  0.0  70988  1284 ?        Ssl  Jul04   0:04 /usr/sbin/Netwo
avahi     2884  0.0  0.0  31896   588 ?        Ss   Jul04   0:01 avahi-daemon: r
avahi     2885  0.0  0.0  31764   124 ?        Ss   Jul04   0:00 avahi-daemon: c
root      2896  0.0  0.0  21100   332 ?        S    Jul04   0:00 /sbin/wpa_suppl
root      2899  0.0  0.0  69120  1232 ?        S    Jul04   0:01 /usr/sbin/nm-sy
root      2917  0.0  0.0  67960  1156 ?        Ss   Jul04   0:00 /usr/sbin/cupsd
root      2946  0.0  0.0  33296   504 ?        Ss   Jul04   0:00 /usr/bin/system
daemon    3019  0.0  0.0  16524   188 ?        Ss   Jul04   0:00 /usr/sbin/atd
root      3047  0.0  0.0  19972   356 ?        Ss   Jul04   0:00 /usr/sbin/cron
root      3144  0.0  0.0      0     0 ?        S<   Jul04   0:00 [firegl]
root      3145  0.0  0.0   3944   240 tty1     Ss+  Jul04   0:00 /sbin/getty 384
root      3164  0.0  0.0   6488   608 ?        S    Jul04   0:02 /sbin/dhclient
ntp       3280  0.0  0.0  29708   684 ?        Ss   Jul04   0:01 /usr/sbin/ntpd
charles   3454  0.0  0.0  84092   784 ?        S    Jul04   0:00 /usr/bin/gnome-
charles   3466  0.0  0.0 173984  2728 ?        Ssl  Jul04   0:03 x-session-manag
charles   3523  0.0  0.0  35940   128 ?        Ss   Jul04   0:00 /usr/bin/ssh-ag
charles   3526  0.0  0.0  23824   260 ?        S    Jul04   0:00 /usr/bin/dbus-l
charles   3527  0.0  0.0  21792  1172 ?        Ss   Jul04   0:01 //bin/dbus-daem
charles   3532  0.2  0.1 372328  3828 ?        Ssl  Jul04   5:50 /usr/bin/pulsea
charles   3533  0.0  0.0  68048   752 ?        S    Jul04   0:00 /usr/lib/pulsea
charles   3535  0.0  0.0  46076  3044 ?        S    Jul04   0:26 /usr/lib/libgco
charles   3546  0.0  0.0 165056  2024 ?        Ss   Jul04   0:00 /usr/bin/seahor
charles   3552  0.0  0.1 225740  4116 ?        Ssl  Jul04   0:30 /usr/lib/gnome-
charles   3556  0.0  0.0  41248  1396 ?        S    Jul04   0:00 /usr/lib/gvfs/g
charles   3564  0.0  0.0 144868  1056 ?        Ssl  Jul04   0:00 /usr/lib/gvfs//
charles   3570  0.0  0.0   4024   200 ?        S    Jul04   0:00 /bin/sh /usr/bi
charles   3637  0.3  0.1 234780  4916 ?        S    Jul04   9:16 /usr/bin/compiz
charles   3638  0.2  0.6 348612 23272 ?        S    Jul04   5:52 gnome-panel
charles   3640  0.0  0.7 529244 24704 ?        S    Jul04   0:43 nautilus
charles   3642  0.0  0.0 152348   820 ?        Ssl  Jul04   0:00 /usr/lib/bonobo
charles   3646  0.0  0.1 191976  3688 ?        S    Jul04   0:03 nm-applet --sm-
charles   3648  0.0  0.1 237344  4304 ?        S    Jul04   0:08 update-notifier
charles   3650  0.0  0.0 227248  3084 ?        Ss   Jul04   0:04 gnome-power-man
charles   3654  0.0  0.0 146936  2364 ?        S    Jul04   0:00 /usr/lib/notify
charles   3658  0.0  0.0  45424  1616 ?        S    Jul04   0:00 /usr/lib/gvfs/g
charles   3664  0.0  0.1 220100  3752 ?        S    Jul04   0:00 /usr/lib/gnome-
charles   3666  0.0  0.0  56136  1396 ?        S    Jul04   0:00 /usr/lib/gvfs/g
charles   3668  0.0  0.0  54484  1060 ?        S    Jul04   0:00 /usr/lib/gvfs/g
charles   3669  0.0  0.0   4024   184 ?        Ss   Jul04   0:00 /bin/sh -c /usr
charles   3670  0.0  0.0   4024   192 ?        S    Jul04   0:00 /bin/sh /usr/bi
charles   3672  0.1  0.2 195724  8048 ?        S    Jul04   2:54 /usr/bin/gtk-wi
charles   3675  0.4  0.1 217376  5552 ?        S    Jul04  13:26 /usr/lib/gnome-
charles   3681  0.0  0.1 280584  5532 ?        Sl   Jul04   0:01 /usr/lib/gnome-
charles   3687  0.0  0.0  40856   804 ?        S    Jul04   0:00 /usr/lib/gvfs/g
charles   3700 12.3 18.5 1626924 647508 ?      Rl   Jul04 357:07 /usr/lib/firefo
charles   3723  0.0  0.1 162048  3800 ?        Ss   Jul04   2:04 gnome-screensav
root      4014  0.0  0.0  72664  3360 ?        S    Jul04   0:00 /usr/bin/python
charles   5469  0.0  0.0 462340  2212 ?        Sl   Jul05   0:00 /usr/lib/evolut
charles   5473  0.0  0.0 414784  2596 ?        Sl   Jul05   0:00 /usr/lib/evolut
charles   5483  0.0  0.1 425940  3660 ?        Sl   Jul05   0:00 /usr/lib/evolut
charles   5929  0.2  0.5 200944 18096 ?        Sl   23:25   0:00 gnome-terminal
charles   5930  0.0  0.0  14412   784 ?        S    23:25   0:00 gnome-pty-helpe
charles   5931  0.0  0.1  20740  3548 pts/0    Ss+  23:25   0:00 bash
charles   6093  5.3  0.1  20840  3648 pts/1    Ss   23:32   0:00 bash
charles   6109  0.0  0.0  15172  1136 pts/1    R+   23:32   0:00 ps aux
charles   6414  0.1  2.8 378084 97976 ?        Sl   Jul05   4:46 evince file:///
charles  16229  0.2  4.0 918172 142004 ?       Sl   Jul05   5:46 /usr/lib/openof
root     32686  0.0  0.0      0     0 ?        S    Jul05   0:00 [pdflush]
root     32687  0.0  0.0      0     0 ?        S    Jul05   0:00 [pdflush]

  #7 (permalink)  
Old 07-09-2009
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 2,461
That big honking thing leaking 40% of your RAM and counting looks like your X server. Note how its actual memory consumption is way higher than the amount still paged in(RSS), its allocating lots of memory, not using it, and having it paged out to make room for more! Try upgrading it.

(You can avoid the lines getting cut off by redirecting ps into a file or pipe, by the way.)

Last edited by Corona688; 07-09-2009 at 03:37 PM..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to deal with lots of data in memory in order not to run out of memory emitrax Programming 1 05-28-2009 11:09 AM
How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9 0ktalmagik Solaris 4 02-03-2009 09:37 AM
How can I get memory usage or anything that show memory used from sar file? panithat HP-UX 1 03-31-2008 01:26 PM
how to round up a memory address(memory alignment problem) nj302 Programming 6 09-21-2005 09:57 PM
Shared memory shortage but lots of unused memory cjcamaro UNIX for Advanced & Expert Users 1 10-13-2004 06:10 PM



All times are GMT -4. The time now is 09:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0