Search squid archive

Re: something not being understood in ,workers , squid proces , cores mapping

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

 



On 27/10/2013 9:58 p.m., Ahmad wrote:
hi ,
about smp and workers
,
just want to understand

1- i want an equation that equal the number of instances for squid  relative
with cache dir  and  worker number ???

ex:
With 3 workers and  1  rock cache =  5 processes running:

i want general  fourm for this above

"Sum of all componentes configured which cause instances to start" is the closest we can give in the way of general formula.

Squid has not been a single-process system since v2.0, possibly earlier. There are always background helper processes doing things for some component or another. The new Disker processes are equivalent to the old cache_dir diskd helpers but for rock storage format and are SMP-aware. Also, it *will* be changing as new SMP support is added/modified.

Get your configuration working the way you want it to go before trying to tune instances to cores. By that time you should have cache.log records to identify what each process number is doing to base the affinity on.

The SMP macros and if-else-endif should always be treated with care and used as sparingly as possible. They are temporary workarounds for the current incomplete or missing SMP support of some components, and we expect to break configurations that use them in future as SMP-support improves.


===========================================================================
2-wts the difference between squid instance and worker ???

"squid instance" is a fuzzy term. Its meaning changes depending on whether you enabled SMP mode or non-SMP mode, or debug non-daemon mode. I think of it as meaning any instance of process running out of the "squid" binary.

worker is a specific type of squid instance....

  im
misunderstanding !! why its better to give worker a core not like cores of
"rock disk" ???

... worker process does all HTTP I/O and protocol handling. Currently they also do a lot of non-HTTP protocols actions like SNMP. But that is planned to change eventually.

isnt  worker  is  squid instance ??!!!

Yes. Worker is a type of squid instance.

3-which will scan and read squid.conf first , is it the instance of squid ??
or the worker of squid ??

The first one to read the config file is something else you may not have noticed yet. The first instance of squid binary to run is the daemon manager. It reads the config file and determines how many processes to fork into (if any). The result is all the kidN processes, forked at different times as determined by the configuration. It then performs the high-availability monitoring to ensure that either the coordinator (SMP-mode) or the single worker process (non-SMP mode) always stays running.

FYI: this design is one reason why Squid is so unfriendly with upstart and systemd. They try to be daemon managers themselves, and things dont work well if you have two managers giving conflicting HA instructions to a set of processes (one manager says shutdown, the other notices outage and auto-starts a replacement ... etc, etc). Or one manager is managing the other, which has no useful effects.

Amos




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

  Powered by Linux