[squid-users] squid: workers on multicore

Alex Rousskov rousskov at measurement-factory.com
Fri Aug 28 17:54:52 UTC 2015


On 08/28/2015 09:39 AM, Amos Jeffries wrote:
> On 29/08/2015 1:28 a.m., Paul Martin wrote:
>> 1) my squid is working with 4 workers (1 to 4). My processor is 8 cores but
>> only 4 cores (5 to 8) are used by squid. How make the 8 cores working
>> (cpu_affinity_map process_numbers ...)?


> In the way the documentation displays:
>  <http://www.squid-cache.org/Doc/config/cpu_affinity_map/>


Squid only supports 1:1 mapping right now, so it is not possible to use
cpu_affinity_map to map 4 workers to 8 cores. Fortunately, this
limitation is a _good_ thing in most cases as discussed below.

If you have 8 virtual/hyper cores and only 4 *physical* ones (which is a
typical case for many (most?) modern CPUs), then you probably do _not_
want a single busy Squid worker to use multiple cores. In that case, you
may want to make sure Squid workers are not sharing physical cores. The
documentation that Amos pointed to will help you after you figure out
where your physical cores are.


If you are sure you want 4:8 mapping, you can still achieve it using
system tools such as taskset(1) on Linux.


HTH,

Alex.



More information about the squid-users mailing list