[OpenSIPS-Users] High load average due to mi_datagram's sockets
Andrei Dragus
adragus at opensips.org
Wed Dec 16 14:56:03 CET 2009
Hi Magnus,
The load average is the average length of the run-queue in the kernel
scheduler. It can be fairly high and still have a low level of CPU-usage.
I've looked into the sources and it seems that sharing Unix sockets is
implemented using some form of user-space synchronization (it uses
spinlocks).
The problem is not in OpenSIPS but rather in the implementation of unix
sockets. If this presents a problem, switch to udp sockets, or set the
number of processes very low.
*/ /*
Bogdan-Andrei Iancu wrote:
> Hi Magnus,
>
> I was able to reproduce this behaviour on my machine ...but this happens
> only with unixsocks and not with UDP socks.....
>
> Let me investigate and see what I will find about.
>
> Regards,
> Bogdan
>
> Magnus Burman wrote:
>
>> I noticed a strange load average on my system. When the system was
>> idle, I had a load of 4.00. It turns out that it's directly related to
>> mi_datagram:s children_count. I had 5, and the load was 4. Lowering to
>> 2 I got load 1.00, lowering to 1 I get 0.00, increasing to 20 I get 19.
>>
>> This is on an idle system (no calls), with nothing but a "regular"
>> setup of Opensips + Mediaproxy (w/ radius and cdrtool).
>>
>> What could possible cause this?
>>
>> --
>>
>> modparam("mi_datagram", "socket_name",
>> "/var/run/opensips/mi_datagram.sock")
>> modparam("mi_datagram", "children_count", 20)
>> modparam("mi_datagram", "unix_socket_mode", 0666) # same without this row
>> modparam("mi_datagram", "socket_timeout", 2000) # same without this row
>>
>> --
>>
>> top - 16:35:46 up 2 days, 20:19, 4 users, load average: 19.00,
>> 18.99, 18.22
>> Tasks: 141 total, 1 running, 140 sleeping, 0 stopped, 0 zombie
>> Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi,
>> 0.0%si, 0.0%st
>> Mem: 3060736k total, 1198600k used, 1862136k free, 123576k buffers
>> Swap: 9896000k total, 0k used, 9896000k free, 559468k cached
>>
>> --
>>
>> Best Regards,
>> Magnus
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
>
--
Andrei Dragus
www.voice-system.ro
More information about the Users
mailing list