Re: [squid-users] How do I keep objects in memory in http accelerator mode??

From: Joe Cooper <joe@dont-contact.us>
Date: Thu, 03 Oct 2002 15:17:52 -0500

Set 'cache_mem' high enough to store all of your working set, plus a
little wiggle room. This will allow Squid to answer all requests from
memory.

If you want disk activity to stop, you'll need to use the null storeio
type. This causes Squid only the use memory for caching.

Disk writes can be a bottleneck on a Squid system, if you're pushing it
very hard (or have slow disks), so if you're working set fits in RAM,
and you don't need permanent storage of cached objects, take the disk
out of the picture entirely.

Andy Sautins wrote:
> We have squid ( 2.5 STABLE 1 ) running as an http accelerator on a 2
> processor SUN e420 with 2GB of memory. The site that it is
> accelerating have a small number of objects ( total size of all
> objects < 100 MB ) and each object ( a gif or jpg image ) is set to
> expire in 4 hours using apache mod_expires.
>
> What I'm confused about is that when squid is running, I see the
> process only taking up about 20MB and I notice that DISKD is active
> storing/retrieving from disk. Given the total number of objects and
> their total size, my preference would be to have squid avoid going to
> disk entirely and store all objects in memory.
>
> I tried setting the maximum_object_size to 0 and minimum_object_size
> to 500 KB. The comments in the squid.conf file suggest that these
> parameters would keep the objects from being stored to disk and I
> would assume that the objects would be cached in memory ( our
> cache_mem parameter is set to 300 MB with 2 cache directories of 200
> MB each ). It seems like this should work, but when I try it all
> requests get passed back through to apache ( meaning, I don't think
> it's caching ).
>
> My question is, is it possible to force squid to cache only to memory
> ( or as much as possible ) and prefer going back to the server
> instead of disk?
>
> Thanks
>
> Andy
>
>

-- 
Joe Cooper <joe@swelltech.com>
Web caching appliances and support.
http://www.swelltech.com
Received on Thu Oct 03 2002 - 14:18:50 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:35 MST