mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: <bluefoxicy@linux.net>, <linux-kernel@vger.kernel.org>
Subject: RE: Slab allocator . . . cache?  WTF is it?
Date: Tue, 30 Dec 2003 15:20:24 -0800	[thread overview]
Message-ID: <MDEHLPKNGKAHNMBLJOLKMELIJBAA.davids@webmaster.com> (raw)
In-Reply-To: <20031230221859.15F503956@sitemail.everyone.net>

> Mem:    775616k total,   747740k used,    27876k free,    96584k buffers
> Swap:   250480k total,    71340k used,   179140k free,   298852k cached
>
>
> This is somewhat distressing.  Last time this happened, I started
> opening every
> program I had (including every OpenOffice.org product and every
> browser I had
> installed), and the "cached" value dropped quickly.

	So, as you've seen, when the kernel needs memory, it can easily throw its
cached data away and gain as much free memory as it needs.

> I'm wondering, what IS cache?  It seems to increase even when
> swap is not used,
> and sometimes when there's no swap partition enabled.  It also
> seems to cause
> me to run into swap when I have ample ram available,

	All true, all good. No matter how much RAM you have available, odds are you
are moving more dat to and from disk then you have RAM. So it sometimes
makes sense to swap stuff to make room for more cache.

> assuming
> that cache is just
> some sort of cache that is copied from and mirrors another
> portion of ram for
> some sort of speed increase.

	More typically, it contains copies of data that was written to or read from
disk in case it is requested (again).

> It's wasteful to me,

	Huh? Why do you say that?

> and I want to
> more understand
> its implimentation and its purpose, and in all honesty limit its
> impact if possible.
> I got this RAM upgrade because I was using about 676M of RAM
> total, including swap,
> at peak; and now I find myself using 820M RAM at peak and about
> 750-800 continually.

	If you don't want the computer to use the RAM, take the RAM out of the
computer. The computer will use all of the RAM you give it. Why shouldn't
it?

	DS



  parent reply	other threads:[~2003-12-30 23:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-30 22:18 john moser
2003-12-30 23:01 ` Fox!MURDER
2003-12-30 23:04 ` Doug McNaught
2003-12-30 23:20 ` David Schwartz [this message]
2003-12-30 23:50 ` Mike Fedyk
2003-12-31  3:27   ` Mike Fedyk

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=MDEHLPKNGKAHNMBLJOLKMELIJBAA.davids@webmaster.com \
    --to=davids@webmaster.com \
    --cc=bluefoxicy@linux.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®