On Nov 27, 2006 at 23:14, Andrei Pelinescu-Onciul andrei@iptel.org wrote:
On Nov 27, 2006 at 19:02, Bogdan-Andrei Iancu bogdan@voice-system.ro wrote:
small typo below...
Bogdan-Andrei Iancu wrote:
Hi Klaus,
as the discussion about ser's improvements bounces again to openser, I had to do a bit of digging to provide a correct answer to openser's users.
yes, there were some improvements did by Andrei to TM, mainly in timer implementation. As you were wondering, the 0.9.6 SER should be relatively close to openser 0.9.4 as TM performance and merging the results from Vaclav with Andrei tests before the timer improvement in SER 0.9.6, seams to be correct. See: http://lists.iptel.org/pipermail/serdev/2005-December/006583.html
After this improvement, SER's 0.9.6 performances dramatically increased, but unfortunately, according to our tests it is also dramatically wrong. TM timers are not working correctly when variable timeouts are used in SER.
With the improvement, the following scenario gets broken - 3 calls only, no load, default cfg:
CALL 1: has 60 secs timeout for Final_response_timeout - nobody answers, still ringing in less than 2 secs -> CALL 2: has 70 secs timeout - it is immediately answered. in less than 2 secs -> CALL 3: has 10 secs timeout for Final_response_timeout - nobody answers, ringing.
Of course, everybody expects that CALL3 will timeout before CALL1 (with more than 40 secs), but in SER 0.9.6 (latest stable for the last 2 years), this will not happened - both CALL3 and CALL1 will timeout simultaneously when the CALL3 timer hits.
Thanks a lot for the bug report.
I've made a quick fix attempt (patch attached). Note that this is work in progress, very lightly tested, not optimized. It's just a "patch" draft, if it proves not to break something else (it needs a lot of testing which complicated call scenarios), it can be optimized later (e.g. lock only once when deleting the timers for all the branches). I've made it available so early so that other people can test it, improve it, point obvious problems a.s.o. The basic ideea is to immediately remove the fr_timer from the fr timer lists, so that no fr_timer with TIMER_DELETED will remain on the FR*LISTs (which is what causes problems with the variable timers).
Some quick numbers (don't quote them, just for patched/not patched/old stuff comparison):
ser 0.9.7 (no patch) ~20000 cps (*)
ser 0.9.7 (patched) about the same (*)
ser 0.9.7 with the 0.9.4 fix removed <4000 cps (**) (TIMER_SKIP_DELETED defined )
(*) - unfortunately I cannot generate more then 20000-21000 cps right now, so this is not the maximum ser can handle, is just how much I could generate without too much trouble. Memory becomes also a problem, on a 64 bit machine the 20000 cps need over 900Mb of memory for ser 0.9.7 (ser.cvs needs ~800Mb).
(**) starts @4000 then drops to <1000
Note also that this are in fact non-INVITE transaction/s tests. INVITEs should be slower (more complex & more packets). Normal calls per second (INVITE, then BYE) should be a little faster then twice as slow (2 transaction per call).
I've left openser.org lists in the cc in case the openser developers are also interested in fixing this (which would enable them to use the 0.9.4 fix).
Andrei