RE: [squid-users] How do I keep objects in memory in http acceleratormode??

From: Andy Sautins <asautins@dont-contact.us>
Date: Wed, 9 Oct 2002 10:12:02 -0600

   Thanks, that seemed to do the trick.

   I had a little trouble figuring out exactly how to setup the null storeio, so I'll include the steps I used in case anyone is interested.

   I re-configured squid to enable the null storeio as follows
         ./configure --enable-storeio=null

   I then changed the squid.conf file to have the cache_dir directive as follows:
         cache_dir null /null

   That seemed to do the trick. For our type of HTTP accelerator setup ( on a single box with minimal disk, lots of memory and few cached objects ), null storeio dropped the IO significantly as well as the CPU.

   Thanks again.

-----Original Message-----
From: Joe Cooper [mailto:joe@swelltech.com]
Sent: Thursday, October 03, 2002 2:18 PM
To: Andy Sautins
Cc: squid-users@squid-cache.org
Subject: Re: [squid-users] How do I keep objects in memory in http
acceleratormode??

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 Wed Oct 09 2002 - 10:16:47 MDT

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