max file descriptors

Alan DeKok aland at deployingradius.com
Wed Mar 13 14:04:57 CET 2019


On Mar 13, 2019, at 8:08 AM, Stefan Winter <stefan.winter at restena.lu> wrote:
> in src/lib/event.c there is:
> 
> #define FR_EV_MAX_FDS (512)
> 
> To my understanding, this limits the number of sockets FreeRADIUS can
> listen on, as each of those uses a file descriptor.
> 
> Is there a specific reason for the number 512? I.e. is it worth trying
> to up it to my liking, or has this been tried before and fails?

  You can increase it to the systems max FD limit.  That's usually 4K or so.

  The downside is that select() is O(N) in the number of FDs.  So it gets slower and slower.

> And, related: if I listen on IPv4 and IPv6 with ipv4addr and ipv6addr,
> this typically consumes two FDs. Can I have one listen statement with
> the ipaddr statement which then covers both (maybe the :: address), and
> does that consume only one FD then?

  That isn't supported.  We tried that, and the whole 4to6/6to4 thing wasn't good, IIRC.  It ended up being better to just use separate sockets.

  Alan DeKok.




More information about the Freeradius-Users mailing list