Finding correct max_servers limit for accounting purposes

Alan DeKok aland at
Tue Jun 15 14:20:24 CEST 2021

On Jun 15, 2021, at 4:29 AM, Юрий Иванов <format_hub at> wrote:
> Hello,
> I've got stub perl accounting function:
> sub accounting {
>    return RLM_MODULE_OK;
> }
> So there is no slow code.

  It still can be slow.  The Perl module will convert all of the attributes in the packet to Perl variables, and back.  That takes a significant amount of time.

> My accounting traffic (In: 2.5 MiB/s and Out: 328KiB/s):
> [cid:78faf210-0420-47a0-8a82-b54222996377]
> When first portion of traffic hits server it creates max number of servers.

  How much traffic is it receiving?  One packet per second?  A million packets per second?

  It would be helpful to describe the problem.

> It doesn't matter what number 32, 128 or even 600 so 'max_servers' doesn't seem to make much difference.

  It doesn't help to describe the solutions you've tried.  We don't know what the problem is.

> Should I ever worry about regularly reaching the 'max_servers' number of threads if after creating number of threads goes down or mayne C module will work faster?

  To do... what?

  The server can handle 20K accounting packets/s if it just send Accounting-Response, and never does anything with the packets.  That's with 4 threads.

  The more work you make the server do, the fewer packets it can handle.

  So... what are you making it do?

  Alan DeKok.

More information about the Freeradius-Users mailing list