Re: [squid-users] Large Files

From: Adrian Chadd <[email protected]>
Date: Sat, 2 Sep 2006 08:58:19 +0800

On Fri, Sep 01, 2006, Mark Nottingham wrote:
> I'd appreciate some enlightenment as to how Squid handles large files
> WRT memory and disk.
>
> In particular;
> - squid.conf says that memory is used for "in-transit objects."
> What exactly is kept in memory for in-transit objects; just metadata,
> or the whole thing?

Squid used to keep the whole thing in memory. It now:

* can keep the whole object in memory
* If memory is needed, and the object is being swapped out Squid will
  'free' the start of the object in memory - the in-memory copy is
  then not used to serve replies but is just there to be written to
  disk. All subsequent hits come from disk.

> - if something is in memory cache, does it get copied when it is
> requested (because it is in-transit)?

The whole object isn't copied during a memory hit; only the current
'4k' range being read.

> - How does sendfile support in 2.6 affect this?

Sendfile support? :)

> - Does anyone have any experiences they'd care to relate regarding
> memory-caching very large objects?

Not yet; but there's a project on my plate to evaluate this to
begin caching p2p and youtube stuff a bit better..

Adrian
Received on Fri Sep 01 2006 - 18:58:01 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Oct 01 2006 - 12:00:03 MDT