[squid-users] squid workers question
Alex Rousskov
rousskov at measurement-factory.com
Fri Mar 10 15:52:18 UTC 2017
On 03/10/2017 02:38 AM, Matus UHLAR - fantomas wrote:
>> On 03/09/2017 10:24 AM, Matus UHLAR - fantomas wrote:
>>> is running aufs with rock store and safe, when not running with "-N"?
>
> On 09.03.17 11:02, Alex Rousskov wrote:
>> Running AUFS in SMP mode is unsafe by default but some admins use
>> configuration hacks to make it work for them. Primary Store developers
>> do not test such configurations (or AUFS in general).
>
> according to the "workers" docs, "workers 0" is the same as "squid -N" and
> "workers 1" is non-SMP mode
Sorry, but that 2010 documentation is outdated. It was written before
Rock store, a 2011 feature that changed what "SMP mode" means. This is
my fault. Here is a replacement draft that I was working on until wiki
went down:
> NAME: workers
> DEFAULT: 1
> Number of main Squid processes or "workers" to fork and maintain.
>
> In a typical setup, each worker listens on all http_port(s) and
> proxies requests without talking to other workers. Depending on
> configuration, other Squid processes (e.g., rock store "diskers")
> may also participate in request processing. All such Squid processes
> are collectively called "kids".
>
> Setting workers to 0 disables kids creation and is similar to
> running "squid -N ...". A positive value starts that many workers.
>
> When multiple concurrent kids are in use, Squid is said to work in
> "SMP mode". Some Squid features (e.g., ufs-based cache_dirs) are not
> SMP-aware and should not or cannot be used in SMP mode.
>
> See http://wiki.squid-cache.org/Features/SmpScale for details.
The final version will probably move and extend the terminology-related
text to the SMP section preamble -- it is kind of wrong to talk about
diskers when documenting workers. Improvements and constructive
suggestions welcomed!
> so, with "workers 1", both aufs and rock should work properly, with rock
> using separate process, correct?
There are several ways to interpret your question, but the most likely
interpretation leads to the "incorrect" answer: Without -N, a
combination of "workers 1" and at least one "cache_dir rock" enables
SMP. Do not use ufs-based cache_dirs in SMP mode.
>> Running a combination of AUFS and Rock stores in SMP mode is crazy.
> I get that as in SMP mode, ufs should be used?
I do not know what you mean by "that" but ufs is not SMP-aware. Thus,
ufs (including all ufs-based stores such as aufs and diskd):
* should not be used in SMP mode at all and
* must not be used in SMP mode in combination with rock stores.
HTH,
Alex.
More information about the squid-users
mailing list