[OpenSIPS-Users] sched_yield()

Andrei Dragus adragus at opensips.org
Wed Jan 20 13:58:29 CET 2010


Hi,

I think that there is a lock that is being held more than it should be 
and that's what causes starvation. It would help us if you could attach 
to a process using gdb and give us a full backtrace.

Temporary solutions which should work would be to reduce the number of 
processes to 4-6 or to recompile replacing -DFAST_LOCK with one of the 
other options (-DUSE_POSIX_SEM or -DUSE_PTHREAD_MUTEX) but we should see 
where this is from to fix it.

Alex Massover wrote:
> Hi!
>
> Yes, from the source on debian, I build deb package. (I did some minor changes to the source, but the problem happens also without my changes)
> 16 children on 4 cores.
>
> What do you suggest to reduce it to 4? It runs on 2.6.32 on VMware ESX.
>
> I'm also trying now sleep(0) instead of sched_yield().
>
> --
> Best Regards,
> Alex Massover
> VoIP R&D TL
> Jajah Inc.
>   
>> -----Original Message-----
>> From: users-bounces at lists.opensips.org [mailto:users-
>> bounces at lists.opensips.org] On Behalf Of Andrei Dragus
>> Sent: Wednesday, January 20, 2010 1:05 PM
>> To: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] sched_yield()
>>
>> Hi Alex,
>>
>> Are you building OpenSIPS from source?
>> How many processes do you have and on how many cores?
>>
>>
>> Alex Massover wrote:
>>     
>>> Hello!
>>>
>>> I'm facing a strange problem, sometimes under a stress OpenSIPS
>>> "locks" - load average jumps, SIP processing delays, opensips msg
>>> queue fills with a lot of sip messages, opensips processes start to
>>> comsume a lot of CPU.
>>>
>>> And strace shows:
>>>
>>> sched_yield()
>>>
>>> sched_yield()
>>>
>>> sched_yield()
>>>
>>> sched_yield()
>>>
>>> ....
>>>
>>> for all processes.
>>>
>>> If I stop the stress - after a while (not immediately) - it unlocks,
>>> also suddenly, I can see in top that all opensips processes stop to
>>> consume CPU.
>>>
>>> What can it be? Some kind of starvation?
>>>
>>> --
>>>
>>> Best Regards,
>>>
>>> Alex Massover
>>>
>>> VoIP R&D TL
>>>
>>> Jajah Inc.
>>>
>>>
>>>
>>> This mail was sent via Mail-SeCure System.
>>> ---------------------------------------------------------------------
>>>       
>> ---
>>     
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>       
>> --
>> Andrei Dragus
>> www.voice-system.ro
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> This mail was received via Mail-SeCure System.
>>
>>     
>
>
> This mail was sent via Mail-SeCure System.
>
>
>
> _______________________________________________
> 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