mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: David van Hoose <davidvh@cox.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question regarding inactive memory
Date: Tue, 29 Apr 2003 14:53:08 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0304291444240.5847@chaos> (raw)
In-Reply-To: <3EAEC5BC.3070008@cox.net>

On Tue, 29 Apr 2003, David van Hoose wrote:

> This may be a bit of a newbie'ish question, and maybe a bit off-topic,
> but is there any way for me to remove inactive memory, either explicitly
> or implicitly? I have 512MB of PC2700 SDRAM, but my system is constantly
> eating into the swap I have on my system since I have usually about
> 140-300MB of inactive (and dirty) RAM and usually about only 250MB in
> active memory. Is there a way for me to correct this bad memory usage
> without having to reboot? If patching the kernel would be a possible
> route to venture to, I'm game.
>
> Any suggestions or comments are welcome.
>
> Thank you all!
> David
>

Assuming you are not using a development kernel, the memory
manager will try to use most all available RAM. This is
normal. During most usage, many of the daemons get swapped out,
and unless they are awakened, they don't get swapped back in.
This is normal because one does not want to waste the CPU
cycles necessary to swap back in RAM data that will not be
used.

The purpose of using most all available RAM is to save CPU
cycles and make the machine responsive. If you have a program
that needs RAM, it is grabbed from those buffers you see if
you do `cat /proc/meminfo`. The idea is to nat waste any
RAM.

If you want to just write the stuff on your swap device(s)
back to RAM, to see that it "really works", just execute,
`swapoff -a` as root. You can then execute `swapon -a` and
you are back to "normal".

The 'dirty' buffers are kept around, even after being written
to disk, so they don't have to be re-read the next time you
execute `ls` or run a program.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.


  reply	other threads:[~2003-04-29 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-29 18:34 David van Hoose
2003-04-29 18:53 ` Richard B. Johnson [this message]
2003-04-29 19:06   ` David van Hoose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0304291444240.5847@chaos \
    --to=root@chaos.analogic.com \
    --cc=davidvh@cox.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®