Negative caching
Steve Lamb
grey at dmiyu.org
Fri Jun 19 10:24:19 UTC 2009
Hal Burgiss wrote:
> I think I've figured out why recent Ubuntu has such abysmal performance. Very
> cleverly over a period of time, it takes all the free memory and uses it to
> store useless junk that you will never ever use. And then holds on to the
> useless stuff as long as it possibly can. And then you are forced to
> work out of swap.
Uhm... no. Simple as that. Whatever your problem is has no relation to
caching or buffers. At least if it is you certainly have quite a further
distance to go to prove it than what you've presented in your message. The
cached pages, for all intents an purposes, can be considered free. The
difference between a cached page and a free page is just a couple of bits in a
memory map.
Furthermore I can counter your anecdotal evidence of long running
machines = swap death with two of my own:
{grey at teleute:~} free
total used free shared buffers cached
Mem: 2059048 2006968 52080 0 70812 1671312
-/+ buffers/cache: 264844 1794204
Swap: 2654200 92 2654108
{grey at teleute:~} uptime
03:13:48 up 61 days, 4:49, 1 user, load average: 0.01, 0.00, 0.00
{grey at olethros:~} free ; uptime
total used free shared buffers cached
Mem: 262312 258380 3932 0 13240 41160
-/+ buffers/cache: 203980 58332
Swap: 524280 155980 368300
06:14:26 up 102 days, 14:27, 1 user, load average: 0.00, 0.00, 0.00
The first one is a real machine that I use on my home network for a
firewall, router, file server and my "long-running, remote access X app" box.
IE, it has been running XFCE + KTorrent for those 61 days and it has 92Kb of
swap used and is snappy to respond whenever I connect to it.
The second is a leased VM which runs my http, ftp, smtp, pop, imap (and
other) public facing services. It does so with a whopping 256Mb of memory
(hey, $25/month, ya gets what ya pays for!) and as you can see, an astounding
155Mb of swap as well. Even that machine is somewhat responsive when I remote
into it.
Your speed settings have to the result of something else going on because
the caching that the kernel does, if it were the cause, would be evident to
more people with heavier usage patterns than you. It is the most commonly
maligned function the kernel performs. ;)
--
Steve C. Lamb | But who can decide what they dream
PGP Key: 1FC01004 | and dream I do
-------------------------------+---------------------------------------------
More information about the ubuntu-users
mailing list