Find the answer to your Linux question:
Results 1 to 8 of 8
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 ...
  1. #1
    Ed
    Ed is offline
    Just Joined!
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    59

    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?

  2. #2
    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.

  3. #3
    Ed
    Ed is offline
    Just Joined!
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    59
    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?

  4. #4
    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.

  5. #5
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    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.

  6. #6
    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.

  7. #7
    Just Joined!
    Join Date
    Jun 2002
    Location
    Lindenhurst, NY
    Posts
    35
    As well as the "System Monitor" Applet in KDE

    Tithefug

  8. #8
    Just Joined!
    Join Date
    Aug 2008
    Posts
    9
    why not just type "top" at a terminal and see whats going on?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...