Hi John,

On 11/15/2010 05:34 PM, John Khvatov wrote:
Hello all.

I'm testing performance of OpenSIPS presence server. I got bad results... Any 
ideas how to improve it?

My test scenario (SIPp xml config: http://dev.sgu.ru/pub/pubsub.xml):

SIPp                    Presence Server
  |         PUBLISH             |
  |---------------------------->|
  |                             |
  |         200 OK              |
  |<----------------------------|
  |                             |
  | SUBSCRIBE (on publised uri) |
  |---------------------------->|
  |                             |
  |         200 OK              |
  |<----------------------------|
  |                             |
  |         NOTIFY              |
  |<----------------------------|
  |                             |
  |         200 OK              |
  |---------------------------->|

After 10.000 calls (10.000 scenario) OpenSIPS began to write warnings about 
memory to log:
WARNING:core:fm_malloc: Not enough free memory, will atempt defragmenation

OpenSIPS presence server stores in memory the subscription dialogs and also some publish related information(not the body). So the fact that after 10000 calls the memory gets filled up for 64MB is in the normal limits I think(~6.4k per presence dialog). The shared memory is also used by tm to hold the transactions and you must also take into considerations that the memory is not completely filled up, and it might have empty spaces but if at allocation a larger chunk is required, it can not be provided (this is solved with defragmentation).

Results with 100 calls per second:
Total calls: 74454
Calls per second: 16.485 cps
Successful calls:  73772
Failed calls: 382
(With 10.000 "total calls" OpenSIPS shows 100 cps, almost zero failed calls)


Results with 1000 calls per second:
Total calls 20857
Calls per second: 12.696 cps
Successful calls: 15360
Failed calls: 2497

Yes, this is not a good result .. the reason is that presence processing is quite costly - it requires querying the database all the time - because the Publish information is not stored in memory (the bodies might be very large). So probably the conclusion of your tests is that if you want more then 100 cps, you should use a cluster of presence servers :) .
These results are very interesting, thank you for sharing.

Regards,

--
Anca Vamanu
www.voice-system.ro


SUBSCRIBE to one of 500.000 published user is running 1-2 sec..

System configuration.
OS: Debian squeeze/sid (Not tuned)
Processor: Intel Xeon E5345
RAM: 1G (OpenSIPS executed with -m 64 option. Memory is still available during 
tests)
OpenSIPS: Version 1.6.3. Config is very simple: handle_subscribe()&&  
handle_publish(). fallback2db disabled. Storage postgresql 8.4.

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to