rlm_perl does not honor start_servers?

Igor Novgorodov igor at novg.net
Fri Apr 1 16:35:59 CEST 2016


Okay, thank you very much for the info.

I'll take a look on the rlm_perl code and maybe come up with a patch...

In the meantime it seems that i have to add some logic to the init 
script that will:
1. Block RADIUS port in iptables to not overwhelm the daemon
2. Start FreeRADIUS
3. Warm the server up with radclient
4. Unblock port and let the main traffic flow in

On 01.04.2016 17:28, Arran Cudbard-Bell wrote:
>> On 1 Apr 2016, at 08:20, Igor Novgorodov <igor at novg.net> wrote:
>>
>>
>>
>> On 01.04.2016 17:00, Alan DeKok wrote:
>>> On Apr 1, 2016, at 9:53 AM, Igor Novgorodov <igor at novg.net> wrote:
>>>> I've got latest 3.0.11 FreeRADIUS and Perl authorization module under rlm_perl.
>>>> The server is relatively highly loaded (around 1000 access-requests per sec).
>>>>
>>>> And although i have "start_servers = 256" and "min_spare_servers = 256" in the thread pool
>>>> configuration, FreeRADIUS does not initialize those threads until the requests start to hit the daemon.
>>>    FreeRADIUS starts all 256 threads.  The "spare" threads are created as needed.
>>>
>>>> After some requests in parallel it spawns all required 256 threads and then this number stays constant.
>>>>
>>>> The problem is that the thread creation in rlm_perl seems to be quite expensive timewise (or i may be doing something wrong?).
>>>    Thread creation in Perl is very different than thread creation in the server core.  The server starts 256 threads.  BUT the Perl module still has to initialize any thread-specific context.  That doesn't happen until the module is called.
>> Ok, so there's no way to make it to initialize Perl's thread stuff when the server core threads are spawned?
> Not currently.  There's no hook for modules to do per-thread initialisation.  For the majority of modules that's not an issue.
>
> It wouldn't be terribly hard to add something I guess...
>
> -Arran
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS Development Team
>
> FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
>
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list