[squid-users] [ext] Re: Absolute upper limit for filedescriptors in squid-6?

Amos Jeffries squid3 at treenet.co.nz
Tue Jan 25 20:17:20 UTC 2022


On 26/01/22 03:55, Ralf Hildebrandt wrote:
> * Francesco Chemolli:
>> See configure --max-filedescriptors
> 
> ...
> configure: forcing default of 131072 filedescriptors (user-forced)
> checking Default FD_SETSIZE value... 1024
> checking for getrlimit... yes
> checking for setrlimit... yes
> checking Maximum number of filedescriptors we can open... 32768
> configure: Default number of filedescriptors: 131072
> ...
> 
> Yes, I set "ulimit -n 131072" before running configure
> 

The ./configure has a 2^15 limit for the _default_ FD number. Runtime 
should allow configuring larger values later (sans bugs).


It also depends on the I/O module selected for runtime. Make sure you 
avoid select(2) and poll(2) for large FD numbers.

  select(2) is limited to 1024.
  poll(2) allows numbers large enough to hit RAM and CPU limits on speed.
  epoll(2) is limited to ~3.5 million.
  kqueue(2) is technically "unlimited" but YMMV regarding bugs etc.


Amos


More information about the squid-users mailing list