Hard coding number of radius process.
Hi, I've written rlm_perl module which works. I have some thoughts and want to ask what do you think. My perl module using threads (for sharing variables) and threaded perl is more slower as we all know (Maybe its better idea to use IPC pipes btw). FreeRadius has thread pool section where number of processes can be controlled What do you think if I set start_servers = 64 and max_servers = 64? As I understand now radius will start 64 process at start time and in this case all my rlm_perl processes will not share state but looks like it will not needed because overall number of processes will be eq to 64 and not die and will not lost data. FreeRADIUS because tries will not to maintain servers to handle the current load. Thanks for your thoughts
On Jun 8, 2021, at 9:31 AM, Юрий Иванов <format_hub@outlook.com> wrote:
My perl module using threads (for sharing variables) and threaded perl is more slower as we all know (Maybe its better idea to use IPC pipes btw). FreeRadius has thread pool section where number of processes can be controlled
The "thread pool" section controls the number of *threads*. Not "processes".
What do you think if I set start_servers = 64 and max_servers = 64?
It should be fine. People were running FreeRADIUS with hundreds of threads in 2005.
As I understand now radius will start 64 process at start time and in this case all my rlm_perl processes will not share state but looks like it will not needed because overall number of processes will be eq to 64 and not die and will not lost data.
No, FreeRADIUS will start 64 threads. And the rlm_perl modules will all be able to communicate with each other.
FreeRADIUS because tries will not to maintain servers to handle the current load.
I have no idea what that means. Alan DeKok.
Looks like idea with static threads is not bad, thanks. Here more granular description. Prerequisites: perl based module. FreeRadius by default runs 12 child threads and on excessive load spawns more up to 32 threads. When the load drops FreeRadius kills additional processes down to minimum 12 process. As the result we have 12 "static" threads and 20 floating processes. I want to accumulate some buffer inside each module without using perl threads (because its slow) so I want to set min max servers to 32. As the result I always have 32 perl instances and in this case communication between threads not needed at all. Now inside each process I can create buffer which will not be lost because of dynamic process creation. ________________________________ От: Freeradius-Users <freeradius-users-bounces+format_hub=outlook.com@lists.freeradius.org> от имени Alan DeKok <aland@deployingradius.com> Отправлено: 8 июня 2021 г. 16:35 Кому: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Тема: Re: Hard coding number of radius process. On Jun 8, 2021, at 9:31 AM, Юрий Иванов <format_hub@outlook.com> wrote:
My perl module using threads (for sharing variables) and threaded perl is more slower as we all know (Maybe its better idea to use IPC pipes btw). FreeRadius has thread pool section where number of processes can be controlled
The "thread pool" section controls the number of *threads*. Not "processes".
What do you think if I set start_servers = 64 and max_servers = 64?
It should be fine. People were running FreeRADIUS with hundreds of threads in 2005.
As I understand now radius will start 64 process at start time and in this case all my rlm_perl processes will not share state but looks like it will not needed because overall number of processes will be eq to 64 and not die and will not lost data.
No, FreeRADIUS will start 64 threads. And the rlm_perl modules will all be able to communicate with each other.
FreeRADIUS because tries will not to maintain servers to handle the current load.
I have no idea what that means. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Jun 8, 2021, at 10:38 AM, Юрий Иванов <format_hub@outlook.com> wrote:
Looks like idea with static threads is not bad, thanks.
Here more granular description. Prerequisites: perl based module. FreeRadius by default runs 12 child threads and on excessive load spawns more up to 32 threads. When the load drops FreeRadius kills additional processes down to minimum 12 process.
Again... there are no extra "processes" in FreeRADIUS. If your system is creating processes, then it's your code. Not FreeRADIUS.
As the result we have 12 "static" threads and 20 floating processes.
I have no idea what a "floating process" is.
I want to accumulate some buffer inside each module without using perl threads (because its slow) so I want to set min max servers to 32. As the result I always have 32 perl instances and in this case communication between threads not needed at all. Now inside each process I can create buffer which will not be lost because of dynamic process creation.
There is no dynamic process creation in FreeRADIUS. If your Perl code is creating processes and then not cleaning them up, that's your Perl code. It's not FreeRADIUS. We can't fix your code. Alan DeKok.
participants (2)
-
Alan DeKok -
Юрий Иванов