Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Clear RAM without rebooting?

    Is there a way to clear the RAM in Linux
    without rebooting? I know that *all* of it
    cannot be cleared as long as any application
    including the services and gui stuff is
    running.. but I've been trying to see how
    much RAM this or that application uses
    and I have been doing that by bringing up
    kde's "sytemguard" to watch the RAM
    changes as I invoke and then kill certain
    aps. But in order to drop the RAM way
    down to very little I have noticed that merely
    logging out makes no change, and tells me
    that those aps that were killed are still in
    memory until the system is rebooted.

    That's why I'd like to know if there is a way
    to clear as much RAM as I can without
    having to reboot.

    This is Mepis, a Debian clone, on a machine
    with 512Mb of RAM.

    -- Jerry

  2. #2
    Run an app. Let's say gaim. While it's running do
    ps aux | grep gaim
    I get
    frankel 4378 4.2 3.1 20860 15784 ?? S 1:40PM 0:00.68 gaim
    from running that command.

    Here's an explanation:

    ps aux is a process status utility. Using the | (pipe) pipes a command through it, in this case grep which will search for the word "gaim" in whatever program it's piped through.

    For my results,
    "frankel" is my username
    "4378" is the PID
    "4.2" is CPU usage of process "gaim"
    "3.1" is % of RAM process "gaim" is using - this is what I want to know.

    Now you need to know how much RAM you have. If you don't know,
    dmesg | grep memory
    I have about 512MB, so 3.1% of 512 is about 16MB.

  3. #3
    Linux Newbie
    Join Date
    Sep 2003
    St.Charles, Missouri, USA
    The linux kernel works under the assumption that unused mem is wasted mem. It dynamicly caches disks in the mem so that things run faster and it allows mem to any app that needs it on demand. If you want to see how much you have free the run the command 'free' and subtract the amount used for caches to see usage.
    Powered by Gentoo
    never ever ever use the hardened option in make.conf!

  4. $spacer_open
  5. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Lat: 39:03:51N Lon: 77:14:37W
    to simplify what gwalters said, Linux will constantly attempt to store as much in memory as possible as it can be accessed 100's of times faster than the hardisk, so don't fret that your RAM will fill quickly and stay full, this is a significant speed increaser.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  6. #5
    Thank you all for your informative responses!

  7. #6
    Thanks everyone for this as well, I went searching on google and it brought me back here. My question is answered.


  8. #7
    Just Joined!
    Join Date
    Mar 2005
    Me too just wanted to say thanks for this information...

Posting Permissions

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