[squid-users] Squid Listening on many ports

Amos Jeffries squid3 at treenet.co.nz
Tue Jun 18 05:56:40 UTC 2019


On 18/06/19 8:33 am, johnr wrote:
> Hi,
> 
> I am wanting to run squid listening on many ports (~100-200). From prior
> mailing list questions
> (http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-with-multiple-ips-is-listenting-to-some-ips-with-port-and-not-all-of-ips-td4668784.html),
> I see how this is possible. But, I was curious about an answer in that
> thread...
> 
> 
> 
> A brief glance through the squid code seems as if there is support for
> epoll... In that case, shouldn't listening on multiple ports not have the
> performance cost mentioned above? 
> 

No. The problem is that each "port with an I/O" needs to be looked up in
the set of LISTEN sockets.

It does not matter whether the I/O event handler produces a small set of
I/O-only sockets (epoll, kqueue), or a large set with a small sub-set
marked as I/O pending (select, poll). Only the ones with I/O pending
have the listener lookup. When the listener set is large they both have
the same CPU loading side effect(s).


PS. please be aware (as you can see above) that quoting with HTML via
the Nabble forum does not make it to this plain-text mailing list.


Cheers
Amos


More information about the squid-users mailing list