Search squid archive

Re: Unbalaned Cpu cores with squid 3.4.3 with centos 6.4 64 bit

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

 



On 02/12/2014 07:29 AM, Dr.x wrote:

> ive tried cenots6.4 64 bit with32 G ram with squid 3.4.3 with tptoxy  ,
> 
> but
> 
> the cpu cores are not balanced !!!
> this machine is delr720 it has 24 cores ,

Do you have two physical CPUs with 12 physical cores each? If not,
please note that you may have 24 virtual cores, not 24 physical ones. In
our experience, virtual cores do not help Squid much -- most of SMP
scale ends when you utilize all of the physical cores. We are working on
publishing performance data to illustrate and possibly explain this.

  $ egrep 'cpu cores|physical id' /proc/cpuinfo | sort -u

The above command may be able to tell you how many physical CPUs and
physcal cores you have. On a two-CPU system with 12 physical cores per
CPU, you should get something like this:

  cpu cores	: 12
  physical id	: 0
  physical id	: 1

(there may be a better way to get that information -- this is not my
area of expertise!)


> before i go to try on this machine, i tried it on quad core machine with
> same config squid file and it gave me equal sharing among 8 cores of cpu .
> 
> but when i tried the same config and same kernel and same squid and same os
> on delr720 which has 24 cores cpu ,
> i found that process of squid are only distributed on about 5 cores from
> total of 25 core !!!!!

This is normal !!!!! Squid does not control how many Squid workers the
OS is going to actually use. If you have traffic that 5 cores can easily
handle but you run Squid on a 24-core system, you may (depending on the
OS, kernel version, scheduler, and other factors), see many workers
and/or CPU cores underutilized. This is discussed at length at
http://wiki.squid-cache.org/Features/SmpScale#Will_similar_workers_receive_similar_amount_of_work.3F


> my question is , 
> does squid depend on hardware core cpu ? does that mean squid SMP
> compatibale with some hardware and not with others ???

Apart from being able to configure CPU affinity for kid processes, Squid
does not really know anything about CPU cores. OS deals with those
low-level details, not Squid. See the above wiki page.


> ======================================
> ive pumped about 1000 ips to squid
> and here is a snapshot with cores which are un balanced !
> those are cores of delr720
> <http://squid-web-proxy-cache.1019090.n4.nabble.com/file/n4664748/829718907.png> 

Sorry, but that image is too small to be legible.


> i have only 4 workers and dont wanto to increase them , because i think if i
> increased them i will have low bw utilization .

Bandwidth utilization is a function of incoming and outgoing network
traffic, not the number of SMP workers. In general, the more workers you
have, the more traffic Squid can handle (all other factors being equal)
until you run out of CPU cycles, RAM, or another resource.

Disbalance in CPU core utilization becomes a problem when one of the
cores is approaching its limits while others are idle. See the above
wiki page for the discussion about that problem.


HTH,

Alex.


>> workers 4
>> #cpu_affinity_map process_numbers=1,2,3,4 cores=2,4,6,8





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

  Powered by Linux