Re: [squid-users] Maximum disk cache size per worker

From: Sokvantha YOUK <sokvantha_at_gmail.com>
Date: Fri, 22 Mar 2013 09:11:35 +0700

Dear Alex,

Thank you for your advice. If I want large files to be cached when it
fist seen by worker, My config should change to first worker that see
large file and cache it else left it over to remaining worker for rock
store worker?

Below design is that, I don't want cached content to be duplicated
among AUFS cache_dir and I want to use the advantage of rock store
which can be shared within worker on SMP deployment.

squid.conf
------------

## If large files is seen, will be cached first by process number 1
if ${process_number}=1
cache_dir aufs /cache4/squid/${process_number} 170000 32 256
min-size=31001 max-size=200000000
cache_dir aufs /cache5/squid/${process_number} 170000 32 256
min-size=31001 max-size=200000000
cache_dir aufs /cache6/squid/${process_number} 170000 32 256
min-size=31001 max-size=200000000
cache_dir aufs /cache7/squid/${process_number} 170000 32 256
min-size=31001 max-size=200000000
cache_dir aufs /cache8/squid/${process_number} 170000 32 256
min-size=31001 max-size=200000000
endif

## Cache remaining smal object
# Rock Store: SMP Awared
cache_dir rock /cache1 70000 max-size=31000 max-swap-rate=300
swap-timeout=300
cache_dir rock /cache2 70000 max-size=31000 max-swap-rate=300
swap-timeout=300
cache_dir rock /cache3 70000 max-size=31000 max-swap-rate=300
swap-timeout=300

----
Regards,
Vantha
On Fri, Mar 22, 2013 at 12:13 AM, Alex Rousskov
<rousskov_at_measurement-factory.com> wrote:
> On 03/21/2013 02:21 AM, Sokvantha YOUK wrote:
>
>> ## 2. Handle large object > 32kb < 200MB. The fourth worker handles large file
>> if ${process_number}=4
>> cache_dir  aufs /cache7/squid/${process_number}         170000 16 256 min-size=31001 max-size=200000000
>> cache_dir  aufs /cache8/squid/${process_number}         170000 16 256 min-size=31001 max-size=200000000
>> endif
>
> Just to make sure you are not expecting a miracle here: The above worker
> may cache large files, but ALL workers will receive requests for large
> files. Workers 1-3 will always miss on large files.
>
> On average, 75% of requests for large files will go through workers that
> do not cache them and do not see them in the worker4 cache (in practice,
> this could be 90% if those workers happen to be busier due to OS
> scheduling bias!).
>
> If that is what you are after, the above config is correct. Otherwise,
> you need to redesign.
>
>
> HTH,
>
> Alex.
>
-- 
----
Regards,
Vantha
Received on Fri Mar 22 2013 - 02:11:41 MDT

This archive was generated by hypermail 2.2.0 : Fri Mar 22 2013 - 12:00:05 MDT