[asterisk-users] Concurrent calls including mysql taking lot of time for execution

Steve Edwards asterisk.org at sedwards.com
Wed Oct 21 14:21:42 CDT 2009


On Wed, 21 Oct 2009, das sandesh wrote:

> I tried getting our server setup for 400-500 simultaneous calls, calls 
> were going through properly but at around 200-250 calls, mysql (connect 
> ...) statement was taking at least 5-10 sec to connect to the database. 
> I optimized all possible parameters in my.cnf:

This isn't a "MySQL" performance list and I'm not an "expert," but...

I cobbled up a little C program that created 1,000 concurrent connections 
to my database and it takes 0.15 seconds on an "AMD Phenom(tm) 8650 
Triple-Core Processor." I confirmed via netstat that there were 1,000 
connections. Opening and closing a single connection 1,000 times was still 
less than a second.

This was connecting to "localhost" so it used the UNIX socket. Changing to 
a TCP socket took 0.19 seconds.

I'd look elsewhere -- it's not the MySQL connection that's the problem.

How are you connecting? Is in in an AGI? What language are you using? What 
are you doing with MySQL? A few more details will help :)

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list