Fw: [squid-users] Workers rock, aufs

From: Marcos A. Dzieva <dzieva_at_gmail.com>
Date: Fri, 13 Sep 2013 13:16:40 -0300

It works well:
cache_dir rock /var/cache2/squid/rock 50000 min-size=1 max-size=31000
max-swap-rate=250 swap-timeout=350
cache_dir aufs /var/cache/squid/aufs 850000 64 256 min-size=31001
max-size=346030080

It also works well:
cache_dir rock /var/cache2/squid/rock 50000 min-size=1 max-size=31000
max-swap-rate=250 swap-timeout=350
cache_dir aufs /var/cache2/squid/aufs 850000 64 256 min-size=31001
max-size=346030080

...

But when using the ${process_number} not work:

workers 4
cache_dir rock /var/cache2/squid/rock 50000 min-size=1 max-size=31000
max-swap-rate=250 swap-timeout=350
if ${process_number} = 1
    cache_dir aufs /var/cache/squid/aufs 850000 64 256 min-size=31001
max-size=346030080
endif

It also does not create the swap.state when squid start.

With this configuration squid not start:
workers 4
cache_dir rock /var/cache/squid/rock 50000 min-size=1 max-size=...
cache_dir aufs /var/cache/squid/aufs${process_number} 850000 ...
squid-z created the following:
/var/cache/squid/aufs1
/var/cache/squid/aufs2
/var/cache/squid/aufs3
/var/cache/squid/aufs4

All this was tested on two machines.

Thank you for your attention.
Marcos A. Dzieva

-----Mensagem Original-----
From: Alex Rousskov
Sent: Thursday, September 12, 2013 5:56 PM
To: Squid forum
Cc: Marcos A. Dzieva
Subject: Re: [squid-users] Workers rock, aufs

On 09/12/2013 09:11 AM, Marcos A. Dzieva wrote:
> Dear, I have tried to use workers with rock and aufs, but I could not
> make it work.
>
> workers 4
> cache_dir rock /var/cache2/squid/rock 50000 min-size=1 max-size=31000
> max-swap-rate=250 swap-timeout=350
> if ${process_number} = 1
> cache_dir aufs /var/cache/squid/aufs 850000 64 256 min-size=31001
> max-size=346030080
> endif
> if ${process_number} = 2
> cache_dir aufs /var/cache2/squid/aufs 880000 64 256 min-size=31001
> max-size=346030080
> endif
> if ${process_number} = 3
> cache_dir aufs /var/cache3/squid/aufs 930000 64 256 min-size=31001
> max-size=346030080
> endif
> if ${process_number} = 4
> cache_dir aufs /var/cache4/squid/aufs 950000 64 256 min-size=31001
> max-size=346030080
> endif

> cache_dir aufs can not write to the hdd,

Can you detail that a bit more please? Why do you think Squid cannot
write to aufs directories? Does Squid try and fail? Or those directories
are just not getting any traffic?

Do those aufs dirs show up on cache manager mgr:storedir page?

> it seems that ${process_number} returns no value.

What makes you think that? Please make sure that you start Squid without -N.

Thank you,

Alex.
P.S. BTW, with a little bit of extra work (which I will not discuss here
to stay on topic), you could shorten the above config snippet to
something close to these three lines:

  workers 4
  cache_dir rock /var/cache2/squid/rock 50000 min-size=1 max-size=...
  cache_dir aufs /var/cache${process_number}/squid/aufs 850000 ...

> When using squid -z ${process_number} returns correct value.
>
> I am using the last squid 3.4 and Ubuntu 13.04.
>
> You guys could help me with the configurations?
>
> Thanks.
> Marcos A. Dzieva
Received on Fri Sep 13 2013 - 16:16:43 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 13 2013 - 12:00:07 MDT