Re: [squid-users] Two squid instances based on file types? Is it good?

From: Kevin <[email protected]>
Date: Thu, 17 Feb 2005 12:52:27 -0600

On Thu, 17 Feb 2005 10:17:27 +0100, Marco Crucianelli
<m.crucianelli@elis.org> wrote:
> Thanks for your answer Kevin!
> On Wed, 2005-02-16 at 17:09 -0600, Kevin wrote:
> > On Wed, 16 Feb 2005 21:08:30 +0100, Marco Crucianelli
> > <m.crucianelli@elis.org> wrote:
> > > As I would like to cache normal web stuff and big multimedia files,
> > > like videos, I was thinking about using two different squid instances
> > > running on two different machine.
> >
> > You could instead use a single instance with two cache_dir locations, one
> > with a relatively low max-size to reserve that directory for "small" objects.
>
> Yes, I k now, this was my second option...but I have some doubt on this
> solution:
>
> 1) can I specify different expiral time for each cache dir? I mean: big
> multimedia files do not need to be replaced that often in cache right?

What mechanism are you using to set expire times?

> 2) supposing to have two different cache dir, the first one for normal
> web doc and the second one for big multimedia files, whenever squid
> needs space to cache, let's say, another web doc (small file) does it
> start applying the replacement policy only on the small file cache_dir
> or even in the big file cache dir? I don't want it to purge big
> multimedia files, when it needs to cache only a small web doc!!!

That's a good question.

I guess it depends on how the code is implemented, the squid.conf comments
say "It is used to initially choose the storedir", but not what happens if the
initial storedir is full?

> > You might also consider setting the maximum_object_size_in_memory
> > relatively low, even if you have quite a bit of RAM to work with. I have
> > caches with cache_mem set to 2GB, yet I set m_o_s_i_m to 128KB.
>
> Well, if I need to cache very big files, let's say about 1GB in size, I
> can't set m_o_s to 128kb or I would never cache files bigger than
> 128kb...Am I wrong?

From a production cache:
   $ egrep "^(cache_dir|cache_mem|maximum_)" squid.conf
   cache_mem 2100 MB
   maximum_object_size 16383 KB
   maximum_object_size_in_memory 128 KB
   cache_dir aufs /squid 1600 16 256

Kevin Kadow
Received on Thu Feb 17 2005 - 11:52:28 MST

This archive was generated by hypermail pre-2.1.9 : Tue Mar 01 2005 - 12:00:02 MST