Re: memory question

From: Bert Driehuis <bert_driehuis@dont-contact.us>
Date: Tue, 20 Jun 2000 21:17:10 +0200

Noah Sutherland wrote:

> > Well, the cache_mem is just what's set aside for "hot" objects (requested
> > often, or actually in the process of being downloaded). Squid uses more
> > memory than just cache_mem, in particular: there's a direct relation
> > between the size of your disk cache and Squids memory consumption.
>
> Is there any reference known to show this relationship? So far I've seen
> lots of statements like "make sure you have enough RAM to balance your
> disk cache", but nothing to say what kind of formula to use to calculate
> that properly.

Sorry, just quicky reply, I was going through some old mail and stumbled
on this one. Apologies if someone sent a better reply.

There ain't no such thing as a formula, because one of the parameters is
the disk space taken up by your users workload. Some heuristics exist,
but really, it's very dependant on your users.

What is known is that for each item stored on disk, Squid maintains a
small bit of memory (something like 60 bytes). If you store a million
items on disk, you'll need 60MB just for the state. Add to this the
cache_mem memory, general overhead, other tables and your operating
systems malloc(2) overhead, fragmentation of memory over time, and you
know why such a formala doesn't exist.

But as a rough estimate, if you have 1 million cached objects now and
you run in, say, 196MB of memory, your footprint would increase by about
60MB (or some extra because of malloc() overhead) if you double the
cache space so that 2 million objects get stored.

Cheers,

                                        -- Bert

-- 
Bert Driehuis, MIS -- bert_driehuis@nl.compuware.com -- +31-20-3116119
Dihydrogen Monoxide kills! Join the campaign at http://www.dhmo.org/
Received on Tue Jun 20 2000 - 13:20:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:06 MST