Search squid archive

Re: SMP mode, workers, cache_dir with conditional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/2018 02:15 AM, juju wrote:

> on http://www.squid-cache.org/Doc/config/cache_dir/:
> "In SMP configurations, cache_dir must not precede the workers option
> and should use configuration macros or conditionals to give each worker
> interested in disk caching a dedicated cache directory"

> Perhaps it would be good to specify for which version and which
> cache_dir type this note is for.

Yes, that stale note should be rephrased to discourage unsupported
configurations or even replaced with Squid warnings about unsupported
use of ufs-based cache_dirs in SMP configurations.

I am not sure, but I suspect the "must not precede" part is also stale
or, at the very least, should be unnecessary -- if the right order is
still required, Squid should detect wrong order and quit with an error
message.


Quality patches welcomed.

Alex.



> Le mercredi 10 octobre 2018 à 19:38:55 UTC+2, Alex Rousskov a écrit :
> 
> 
> On 10/10/2018 09:10 AM, Amos Jeffries wrote:
>> On 11/10/18 3:01 AM, juju wrote:
>>> Hello,
>>> Sorry if this question has already been posted ( I can't check as the
>>> "Search Function" is currently not working )
>>> I'm running squid-3.5.20 on Amazon Linux 2018.03. 2 cores with 8 GB
>>> My squid is currently working but only on 1 core.
>>> I which to use the 2 cores. I understood that I have to use workers in
>>> squid.conf with separate cache directory.
> 
>> This is not quite correct.
> 
>> Per-worker configuration is only required for features which are not yet
>> SMP-aware.
> 
> 
> Just a couple of additional clarifications, not contradicting what Amos
> has said:
> 
> 
>> The rock cache type *is* SMP-aware, so one directory can be shared by
>> workers.
> 
> "can be" and "must be". We do not support worker-specific cache_dirs.
> 
> In case of rock cache_dirs, I do not know for sure what would happen if
> cache_dirs are configured on a per-worker basis, but I suspect that
> there will be no disker processes to serve them. At best, you will get
> no disk caching at all.
> 
> 
>> The UFS/AUFS/diskd cache types are not SMP-aware yet, so they do need
>> separate directories per-worker currently.
> 
> ... but worker-specific cache_dirs are not supported, will violate HTTP
> rules, etc.
> 
> 
>> Since you are using only rock type caches you do not have to do anything
>> special for SMP to work.
> 
> ... with your simple configuration that does not use SMP-unaware features.
> 
> In fact, with rock cache_dirs, you do not even have to specify multiple
> workers to get SMP Squid -- by default, Squid will run in SMP mode if
> you have one worker (default) and at least one rock cache_dir. However,
> multiple workers may be necessary to better utilize multicore CPUs.
> 
> Beware of hyperthreading: Do not expect two workers, each showing 80+%
> CPU utilization to be able to share a single physical CPU core
> efficiently. I do not know whether your two cores are hyperthreaded or real.
> 
> N.B. To search the mailing list archives, consider using your favorite
> search engine. Many would accept a site:lists.squid-cache.org restriction.
> 
> Alex.
> 
> _______________________________________________
> squid-users mailing list
> squid-users@xxxxxxxxxxxxxxxxxxxxx <mailto:squid-users@xxxxxxxxxxxxxxxxxxxxx>
> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux