rlm_perl does not honor start_servers?

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Apr 1 16:28:13 CEST 2016


> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20160401/7b5b1797/attachment-0001.sig>


More information about the Freeradius-Users mailing list