[OpenSIPS-Devel] RFC: new opensips design

Stefan Sayer stefan.sayer at iptego.com
Fri Nov 7 17:56:42 CET 2008


sure. but: given you have enough processes/threads, you can fill up your 
CPU with synchronous (blocking) processing as well. only in the case 
that you don't have enough children, you waste 'real' time while waiting.

nowadays, thread creation has become so cheap (in comparision...), that 
synchronous MT (create one thread per task) is definitely an option I 
would say.

but still async MT is better, because you save just this thread 
createion cost, and by this you are safe against certain (blocking) DOS 
attacks. but it comes at the price of higher implementaion complexity. 
its a pity one probably has to make use of all cores, otherwise 
completely async processing with only _one_ thread would make the 
simplest design, and context isolation unnecessary (thus 
inter-message/inter-transaction/inter-dialog/... processing would become 
simple to implement) - and then python would be a possible candidate.

Stefan

o Bogdan-Andrei Iancu [11/07/08 17:32]:
> And one more thing - of course you process more. Note that not all the 
> traffic will require much I/o interaction (rather then reading and 
> putting back on the network) - it is 100% CPU using traffic (like 
> sequential request - ACK for examples). Such traffic will perfectly use 
> the idle time from messages that are stuck in I/O (DNS, DB).
> 
> Regards,
> Bogdan
> 
> Bogdan-Andrei Iancu wrote:
>> Hi Stefan,
>>
>> You do not create additional threads or processes - you just use the 
>> time you waist right now in synchronous I/O ops for processing other 
>> messages by doing context switching.
>>
>> So  DOS attack is not possible - at least not on this scenario :)
>>
>> Regards,
>> Bogdan
>>
>> Stefan Sayer wrote:
>>  
>>> o Bogdan-Andrei Iancu [11/07/08 16:46]:
>>>    
>>>> So, i the same amount of time, you use all the time for computing 
>>>> instead of idle I/O and you can process more traffic.
>>>>       
>>> i doubt you can process more traffic - but you can use all your 
>>> threads/processes efficiently, and do neither have to create too many 
>>> threads, not have all threads blocked, e.g. on some DOS attacks.
>>>
>>> Stefan
>>>
>>>     
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>>   
> 

-- 
Stefan Sayer
VoIP Services

stefan.sayer at iptego.com
www.iptego.com

IPTEGO GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann



More information about the Devel mailing list