LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2011, 02:16 PM   #1
kaptain.kayak
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Rep: Reputation: Disabled
Help! Linux ate my ram!


I understand that Linux is supposed to be caching my memory to optimize performance... but it isn't. I'm sitting here with three tabs open in chrome, and this is what I get when I use the command "free".


total used free shared buffers cached
Mem:2005368 1930468 74900 0 1288 111956
-/+ buff/cache:1817224 188144
Swap:5872632 1409964 4462668

For some reason, I'm using a lot of swap, even though there's free memory, and it's making my computer really laggy. Aside from figuring out what's going on, I don't really know much about Linux! Anyone care to help me figure out what's causing this, and how to solve it?

I'm running Ubuntu 10.04 LTS on a Lenovo R500.
 
Old 09-06-2011, 02:27 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Looking at your output, you have not so much free memory: 75M plus 188M cached that is about the 13% of the total physical memory. The swap used is 1400M that is far more than the available memory. Anyway, you can check the most consuming swap processes by means of the top command: in top press O (uppercase o) followed by p (lowercase p) and press enter to sort the processes by their swap usage. An alternative approach is described here.
 
Old 09-06-2011, 02:30 PM   #3
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Your memory utilization is at 96.3%, and the swap being used is double the amount of free memory, so the point is you do not have free memory. The system can't use every bit of free memory before turning to swap.

You can find out who your biggest memory consumers are by:

- Execute the "top" command.
- Hit shift-O and select option "n" to sort by memory usage.
 
Old 09-06-2011, 08:38 PM   #4
kaptain.kayak
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ok, right now, the biggest user is "gvfsd". It's using 1.3 gb of memory. I don't have any processes running now, except chrome and rythmbox. When I kill gvfsd, things obviously work quite smoothly.

Seems to be a common problem with mp3 players and iphones. Maybe my nexus S is causing the problem?
 
Old 09-06-2011, 08:51 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,254
Blog Entries: 16

Rep: Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120Reputation: 3120
One of the members of my LUG was complaining about "Gnome virtual file system" (gvfs) just last week. Gnome uses the gvfs to manage connections to a lot of stuff and he was complaining that

a) it's not necessary,

b) it clutters up his /etc/mtab (he's a Linux sysadmin in a thin client envirornment), and

b) it's memory hog.

http://en.wikipedia.org/wiki/GVFS

So it's likely that your phone or mp3 player are causing Gnome to invoke the gvfs daeman (gvfsd). It's being a memory hog, though, would seem to me to be a design flaw in the software, not the fault of the phone or mp3 player.
 
Old 09-06-2011, 09:07 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by colucix View Post
Anyway, you can check the most consuming swap processes by means of the top command: in top press O (uppercase o) followed by p (lowercase p) and press enter to sort the processes by their swap usage.
That method is pretty much useless. The Swap column in top is pretty much useless and does not tell you how much swap is used (nor anything even useful in approximating swap use).

The OP apparently already found the problem process. If there is a problem process it is often so extreme that even misunderstanding the true meanings of memory stats in top, the really big memory user will still stand out as a really big memory user.

Quote:
An alternative approach is described here.
I took a quick look and that seems plausible. Finding swap use is pretty tricky, so I would need more than a quick look to say if that alternative approach is correct.

BTW, I know nothing about gvfs. If the OP needs more help, then that should be help regarding gvfs. I only posted to try to prevent the mis information from confusing someone who might find this thread when looking for info on some other memory problem.

Last edited by johnsfine; 09-06-2011 at 09:16 PM.
 
1 members found this post helpful.
Old 09-06-2011, 09:22 PM   #7
kaptain.kayak
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by johnsfine View Post
That method is pretty much useless. The Swap column in top is pretty much useless and does not tell you how much swap is used.

The OP apparently already found the problem process. If there is a problem process it is often so extreme that even misunderstanding the true meanings of memory stats in top, the really big memory user will still stand out as a really big memory user.
Yeah, once I killed gvfsd, it's running perfectly again. Thanks guys!
 
Old 09-07-2011, 02:23 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by johnsfine View Post
That method is pretty much useless. The Swap column in top is pretty much useless and does not tell you how much swap is used (nor anything even useful in approximating swap use).

I only posted to try to prevent the mis information from confusing someone who might find this thread when looking for info on some other memory problem.
Indeed, the total of swap usage in top is far greater than the usage reported by free. I wonder where top gather its information and what is the real meaning of the swap column. Anyway, thanks for the clarification.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux ate my battery ! Bertical Linux - Hardware 4 11-11-2010 01:22 AM
Linux ate my document and I want it back Rundi Linux - General 5 03-16-2004 05:29 AM
Linux ate my drive (for the 2nd time!) graffitici Linux - Software 16 01-12-2004 04:17 PM
Windows ate Linux! RedHattedGnome Linux - Newbie 11 03-30-2003 10:11 AM
Linux ate half of my memory... StamfordRob Linux - Newbie 12 01-29-2002 03:23 AM


All times are GMT -5. The time now is 12:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration