On 1 Apr 2016, at 08:20, Igor Novgorodov <igor@novg.net> wrote:
On 01.04.2016 17:00, Alan DeKok wrote:
On Apr 1, 2016, at 9:53 AM, Igor Novgorodov <igor@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@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2