Re: [squid-users] Small objects in memory only

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 31 Jan 2007 07:35:05 +0800

On Wed, Jan 31, 2007, Reinis Rozitis wrote:

> So theoretically we have to check:
>
> /* Calculate the object size */
> objsize = objectLen(e);
>
> And in case it doesnt exceed some predefined size (lets say 3kb) break
> imideatly without returning 'dirn'..

Just return -1 I believe :)

(Hey, this feels like a squid-dev conversation.)

> Thank you its probably worth a try. Will let you know about the results
> (cause imho it should offload some noticable disk IO) :)

It should do, yup.

> p.s. on the other hand an idea came into my mind while writing this - to
> disable cache_mem usage at all and make some fixed size COSS file (with
> max-size=3072) directly on ramdisk (tmpfs).

Hm, I have a feeling I'm going to have to finish this squid website redesign
and include links to all the various cache filesystem papers written over
the last few years. There's some good stuff in there.

In fact, the 'best' way to handle this is to just spool the objects in memory
and delay swapping them out until you can exploit locality and write the
objects to disk in a nice group. COSS groups writes but doesn't exploit locality
during write or reads. You'd probably be reasonably frightened how quickly
Squid could handle disk caching for small objects with a setup like that..

Adrian
Received on Tue Jan 30 2007 - 16:29:17 MST

This archive was generated by hypermail pre-2.1.9 : Thu Feb 01 2007 - 12:00:01 MST