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

From: Reinis Rozitis <r@dont-contact.us>
Date: Wed, 31 Jan 2007 01:01:21 +0200

> Look in store_dir.c for inspiration. You want to modify
> storeDirSelectSwapDirLeastLoad or storeDirSelectSwapDirRoundRobin
> depending
> on what you use.
>
> If I remember right the swapout selection is done at object creation time.
> If selection fails there it won't be swapped out at all. It'd be nice for
> this to change (if it hasn't already!)
>
> Adrian

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'..

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

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).

rr
Received on Tue Jan 30 2007 - 16:01:29 MST

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