performance issues freeradius 2.1.12

Nathan Ward lists+freeradius at daork.net
Wed Mar 30 03:46:49 CEST 2016


Hi,

> On 30/03/2016, at 12:26, khouzam yaghi <khouzam.yaghi at gmail.com> wrote:
> 
> hi i have around 10k users, i am creating a module for each
> acct-status-type and this module will call a php script in the accounting
> section, it is as follow


It’s not “bad", but calling a PHP script will mean it spins up the PHP interpreter each time you get an accounting packet. If you do maybe a handful per second, then that won’t be too much of a problem. If you are doing lots, it will be. Are your 10k users online at the same time? What is your interim update timer? What rate do users re-connect (which generates auth and accounting start/stop)? Or put another way, how many times per second are you getting accounting messages, and calling the PHP interpreter?

If you absolutely must use PHP then perhaps there’s some other way you can call it, or perhaps you can re-write your logic in Python or Perl, both of which there are freeradius modules for - this would reduce the incredible overhead of loading the interpreter and parsing the script each time.

It’s an unusual design, however. Typically (based on installations I have worked on) you want to keep all your logic in FreeRADIUS/unlang, write stuff to databases, and then have some non-real time script process it from there.

If you were at the limits of what you could do in unlang/SQL, then there are patterns you can use to use a pool of backend servers etc. etc. - however in your case with a very small installation, you should fix how the logic works first.

--
Nathan Ward



More information about the Freeradius-Users mailing list