[OpenSIPS-Devel] HELP PLEASE!! I modified Opensips presence server and performance worsens.

surya chauhan.suryaveer at gmail.com
Thu Jan 14 17:19:58 CET 2016


Hi All,

My level of expertise- It's the first time that I worked on Unix and C.

I am using the Opensips 1.8.3.

*TL;DR* But hope someone reads. I am in deep trouble.
For a project, I modified the Presence server to have REST wrapper over
database calls and use REDIS as the cache (/instead of the in-memory hash/).

I managed to do all this and the Presence Server was functioning properly.

Problems surfaced when I started the performance testing. Even for just
PUBLISH-200OK test the response times becomes close to 100-200ms at 50CPS
and for SUBSCRIBE-NOTIFY (/with no presentities present/) the results are
worst, no calls in 10ms range and very high number of calls in 500 ms range
at 50CPS.

Everything is local (Opensips & REDIS in one VM and Tomcat & MYSQL in
another) I was testing from SIPP increasing the call rate by 10 every 5
seconds.

I monitored the response times of Tomcat and they were in acceptable range
(like 5ms) and same with REDIS.

I am using connection pooling at all levels, meaning, to connect with REDIS,
Tomcat and in REST service to connect to MYSQL. I confirmed this by checking
the logs of REDIS and MYSQL, couldn't confirm for Tomcat.

This means something I have done inOpensips that is notorious but I don't
know how I can troubleshoot this. I tried to use tools such as Valgrind,
gprof but couldn't make them work on Opensips (/The tutorials work though on
standalone codes./)

I did some test manually and found the snprintf( I was using heavily) takes
higher CPU, so, I replaced it with a custom function, this reduced the
number of calls in 500ms range of SUBSCRIBE-NOTIFY request but still the
performance is uncomparable to the Original.

Sorry for the long mail, I had to describe what I have done.

I'll greatly appreciate any help, guidance to troubleshoot this. I have no
local help available and this is last hope. It's over a month now since I am
struggling to troubleshoot this.

I'll be happy to share whatever details required.

Thanks,
Surya



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/HELP-PLEASE-I-modified-Opensips-presence-server-and-performance-worsens-tp7600722.html
Sent from the OpenSIPS - Devel mailing list archive at Nabble.com.



More information about the Devel mailing list