Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Newbie > My RAM is being eaten!

Forgot Password?
 Linux Newbie   If you're new to the wonderful world of Linux, start here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 02-04-2003   #1 (permalink)
Ed
Just Joined!
 
Join Date: Jan 2003
Location: Texas
Posts: 59
Send a message via AIM to Ed
My RAM is being eaten!

When I first turned on my computer, I went into "Memory" only to discover that 57% of my RAM is being used as either cache, buffer, or used/shared. I have 513.93 MB! How can Linux possibly use that much RAM just to run itself? There's several things running in the background, and I can kill those but it still doesn't free memory. They say they are using something like 82 megs of memory, but it doesn't make the slightest bit of difference when I close them. It still says the same amount of RAM is being used up. How can I free up a lot more RAM?
Ed is offline  


Old 02-05-2003   #2 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
I don't know if you know what these caches and buffers are. Basically, linux caches everything it ever reads from the hard drive in memory, so that it doesn't have to be re-read later. If a process needs more memory and there's no free memory, a cache page is destroyed and returned to the program instead. Since there is no other reason for freeing these cache pages, linux simply doesn't. So those 57% of used memory are mostly just things that have once been read from your hard drive, they aren't what keeps the system alive. For the same reason, not much memory is freed when a terminate a process, since most of that memory are just mapped directly from the hard drive to that process' memory space. Therefore that memory isn't freed either. There are also shared libraries, ie. subroutine libraries such as libc or Xlib that are in use by several processes simultaneously, so if one of them exits, the memory occupied by these libraries cannot be freed since it's still used by the remaining processes. It's an incredibly effective way to save memory, since libc only has to be loaded once and then used by all processes in the system.
I, too, have 512 MB of RAM, and it's constantly full. Right now, I've got 11 MB free. But on the other hand, Linux has probably cached my entire directory tree, which speeds up disk searches tremendously. And it doesn't hurt, since these caches can easily be given to any process that would need them.
To find out how much memory is really free, take the indicated free memory and add the caches and buffers fields to it.
Dolda2000 is offline  
Old 02-05-2003   #3 (permalink)
Ed
Just Joined!
 
Join Date: Jan 2003
Location: Texas
Posts: 59
Send a message via AIM to Ed
Is there anything to keep Linux from caching/buffering so much? I could swear I saw something a few days ago that said when I go into a directory, it pre-reads the next 5 directories stemming down from it. My memory actually seems to be managing itself pretty good right now, so it doesn't really matter. However, there's something still slowing my system tremendously.

I have a 2.27 GHz Pentium 4. Fast. Starting about 2 or 3 days ago, it's been anything but fast. I've been waiting up to half a minute just for Konqueror to open up a folder. Programs? I watch TV while waiting for those to open. The only things I've changed to my system in the past few days is add XMMS and Limewire into my Kicker, along with getting Limewire to correctly work. Other than that, it's exactly the same. Do you have any idea what could cause this sudden decrease in speed?
Ed is offline  
Old 02-05-2003   #4 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
Well, you don't want to prevent Linux from caching. Caching is only good.
However, what you're describing is a big problem. Although I can't tell what's causing it, it shouldn't be too hard finding out. The first step would be to start a Konsole and running "top" while starting Konqueror to see if there's anything else than Konqueror on your processor. Also check /proc/cpuinfo to see so that your processor isn't slowed down for any reason. Check the "cpu MHz" and "bogomips" entries in /proc/cpuinfo.
Dolda2000 is offline  
Old 02-05-2003   #5 (permalink)
Linux Enthusiast
 
Join Date: Jun 2002
Location: San Antonio
Posts: 622
Send a message via AIM to wassy121
yeah, this is definately not a ram issue. Something might be eating your CPU, like a runaway mplayer instance (or instances, I have had this running 99% of my cpu for days before I noticed and killed them)
__________________
I respectfully decline the invitation to join your delusion.
wassy121 is offline  
Old 02-05-2003   #6 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
The CPU monitor applet in GNOME is really useful for such situations.
Dolda2000 is offline  
Old 02-06-2003   #7 (permalink)
Just Joined!
 
Join Date: Jun 2002
Location: Lindenhurst, NY
Posts: 35
Send a message via AIM to tithefug Send a message via MSN to tithefug Send a message via Yahoo to tithefug
As well as the "System Monitor" Applet in KDE

Tithefug
tithefug is offline  
Old 10-23-2008   #8 (permalink)
Just Joined!
 
Join Date: Aug 2008
Posts: 9
why not just type "top" at a terminal and see whats going on?
mike171562 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:26 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2