Re: [squid-users] Does Squid move objects from disk to RAM?

From: Denis Vlasenko <vda@dont-contact.us>
Date: Sat, 2 Jul 2005 13:52:47 +0300

On Saturday 02 July 2005 01:01, Henrik Nordstrom wrote:
> On Fri, 1 Jul 2005, Denis Vlasenko wrote:
>
> > Hmm how much is OS filesystem cache slower?
>
> Not much, but the overhead for Squid to access it is quite significant
> (internal to Squid). This because Squid assumes the data is on disk and
> schedules an async read operation to read it in.

Async read shouldn't take long if data is in OS disk cache.
(In theory, that is. I didn't measure aio internal overhead...)

> > I'd like to use OS fs cache for this instead. Otherwise system will have
> > data doubly cached in RAM (once in fs cache and once in squid). Than's
> > wasteful.
>
> Instead of what? To me it looks like you are asking to have it the way it
> already is?

It is already this way for data which is found in on-disk cache,
but not in squids' RAM cache.

Freshly fethched stuff is in squid RAM cache _and_ in filesystem cache too
(it gets there when squid issues writes to it's on-disk cache. OS caches
writes too). This stuff temporarily is doubly cached in RAM.

Not very easily solvable problem. The most thorough way is to look at
aio code path (both in squid and Linux kernel) for 'already in OS cache'
case, and improving it.

--
vda
Received on Sat Jul 02 2005 - 04:53:17 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Aug 01 2005 - 12:00:01 MDT