You are not logged in.

#1 2009-05-13 07:36:13

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

What's hogging all the ram?

I have 4Gb of ram installed, but free -m says that 1787 is used.
I'm using Gnome with awn. I have firefox running, sonata, mpd, Emesene, thunderbird, and compiz. And compiz is really laggy sometimes.

how to I output the "top" command to a way I can copy and paste the data here?

Offline

#2 2009-05-13 08:35:48

MattSmith
Member
From: Wellington, New Zealand
Registered: 2009-02-08
Posts: 108

Re: What's hogging all the ram?

Hmm, I would say firefox on this one, depending on how many tabs I mean I have 15 tabs open, and it's taking up 350 megs. One thing I noticed though is sometimes certain web apps tend to run rampant, like facebook or gmail. I have no idea why this is but htop will tell me firefox is using far more ram and cpu than it should I close facebook, or gmail, and then it goes back to normal.

output the top command like this:

top | less

you could use top | more but I couldn't leave the innuendo alone wink


A thing of beauty is a joy forever
                         
                               -John Keats

Offline

#3 2009-05-13 08:38:48

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: What's hogging all the ram?

Remember that you shouldn't count cached memory into your "used" memory (since that are just remains of programs that you have used and not using atm), so the relevant number for this consideration is in the second line "+/- buffers/cache". Or even better use the ps_mem.py script, that lists memory usage by program.

Offline

#4 2009-05-13 08:39:15

dodobas
Member
From: Croatia
Registered: 2009-04-21
Posts: 12

Re: What's hogging all the ram?

Linux is a system that tends to cache a lot of stuff, application, files, etc., using all of available ram

Don't worry if an application needs to use more RAM, system will just drop some of cached data...


It would also be great to have my computer built into my skull. That way I could surf the Net during useless periods of life, such as when people talk to me.

Offline

#5 2009-05-13 10:33:49

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: What's hogging all the ram?

$free -m
             total       used       free     shared    buffers     cached
Mem:          3884       2484       1399          0        542        922
-/+ buffers/cache:       1019       2864
Swap:         2000          0       2000

This means that I'm only using (2484 - 922 = ) 1562 Mb of ram?

Last edited by zephyrus17 (2009-05-13 10:37:46)

Offline

#6 2009-05-13 11:08:18

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: What's hogging all the ram?

zephyrus17 wrote:
$free -m
             total       used       free     shared    buffers     cached
Mem:          3884       2484       1399          0        542        922
-/+ buffers/cache:       1019       2864
Swap:         2000          0       2000

This means that I'm only using (2484 - 922 = ) 1562 Mb of ram?

no, 2484-922-542=~1019 Mb

http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html wrote:

Memory Buffers - A page cache for the virtual memory system. The
    kernel keeps track of frequently accessed memory and stores the
    pages here.

    Memory Cached - Any modern operating system will cache files
    frequently accessed. You can see the effects of this with the
    following commands:

Last edited by pressh (2009-05-13 11:08:37)

Offline

#7 2009-05-13 11:32:09

thisperishedmin
Member
Registered: 2008-11-04
Posts: 164

Re: What's hogging all the ram?

for more...you can also sort the top command by %memory, %cpu, etc.  --- similiar to windows task manager.

for example:

$top

to launch the program.  pressing h brings up help, q exits.

pressing uppercase F (shift+f) pulls up a "sort field" option. from here you can choose to sort by process id, process status, %memory, %cpu, and more.

to sort by memory, you would press "n" to make that selection, and then enter to verify and return to the overview.  top will now sort by memory usage.

This doesnt give any hard numbers, but its a very useful way to see what is consuming memory and cpu and under what conditions it does so.

hope that helps.

PS - top can do many more useful things. I suggest investigating it some more smile

Offline

#8 2009-05-13 11:49:00

zephyrus17
Member
Registered: 2008-06-15
Posts: 323

Re: What's hogging all the ram?

@thisperishedmin: I will. top is quite a nifty program

@pressh: 1Gb still seems like quite a lot.. What's the main drain in this case? Compiz?

Offline

#9 2009-05-13 14:52:42

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: What's hogging all the ram?

zephyrus17 wrote:

@thisperishedmin: I will. top is quite a nifty program

@pressh: 1Gb still seems like quite a lot.. What's the main drain in this case? Compiz?

yes, it is a lot of RAM used,
with KDE, Openoffice doc open, amarok playing, thunderbird mail open, firefox with flash playing, lightzone (editing CR2 pic), konqueror (with picture preview) it takes ~700MB

But I think that you may need to optimize software you are using (whenever possible). Still with this amount of spare RAM, you are fine.

Offline

#10 2009-05-13 15:08:12

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: What's hogging all the ram?

htop is rather handy, it's more readable than top.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#11 2009-05-13 15:35:22

thisperishedmin
Member
Registered: 2008-11-04
Posts: 164

Re: What's hogging all the ram?

Mr.Elendig wrote:

htop is rather handy, it's more readable than top.

just installed to try it out (pacman -S htop for anyone who is wondering) and I must say it seems pretty nice...

I'll probably continue to use top just because I use it alot at work where whatever comes default is a necessity to get around. (This is why I've learned Vi and why I've learned what I know about top so far =P)

Thanks for the recommendation though smile

Offline

Board footer

Powered by FluxBB