Re: [squid-users] Re: Squid Memory Usage

From: Henrik Nordstrom <[email protected]>
Date: Mon, 15 Feb 1999 02:27:10 +0100

Chris Tilbury wrote:
 
> I didn't actually mean to take this discussion to the list, at least
> initially! I was really thinking aloud, which is always a dangerous
> thing. Not to worry, though :-)

Don't worry. I always think aloud in my messages (haven't you noticed?)

I think this discussion does belong to the list. (why not?) It is an
discussion on how to configure Squid and how different configurations
affect Squid performance, and as far as I know discussions like this is
one of the intentions with squid-users mailing list.

> I'm confused. So if cache_mem is being used merely as a buffer between
> the network->disk, isn't it just a buffer cache layered on top of another
> buffer cache?

You are not alone. The actual implementation of cache_mem is confusing.

I think the intention of the current intention of cache_mem is mostly a
buffer for in-transit data. I is however not fully implemented in that
way and may act as a LRU cache for smaller objects received from the
network as well.

My understanding of the cache_mem store:
* Data received from the network is stored in cache_mem
* Data which has already been stored on disk (or read by all clients if
not caching) are removed from cache_mem. This is to prevent larger
objects from using a lot of memory.
* Data is stored from cache_mem to disk.
* Clients read data from cache_mem if available, else from disk.

> How exactly has this changed from squid 1 -- I guess

Squid 2 uses memory in a way which is more like 1.NOVM than 1.1. But
again, not exactly 1.NOVM either.

> Going with what you've said, I'm actually still not that suprised that
> I saw a performance boost when I essentially disabled the OS level
> buffer cache on the cache filesystems and upped
> cache_mem.

I am suprised. But then, perhaps the only objects worth storing in
memory are small ones which changes very often.

Do you get a noticeable performance drop if you lower cache_mem again?

---
Henrik Nordstrom
Spare time Squid hacker
Received on Sun Feb 14 1999 - 18:18:19 MST

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