<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Not my cup of tea, but I think I&#8217;d
be trying an ODBC connection to reduce some overhead here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>das sandesh<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 21, 2009
2:58 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Asterisk
 Users Mailing List - Non-Commercial Discussion</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [asterisk-users]
Concurrent calls including mysql taking lot oftime for execution</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hi Steve,<br>
<br>
Thanks for your reply.<br>
<br>
I am using only asterisk code (dial plan) in extensions.conf which also
includes connection to the database: like <br>
exten =&gt;nxxxxxxxx,1, MYSQL(connect connid &lt;ipaddr&gt; uname pwd database)
and then the required select queries and the clear and Disconnect the
connection. <br>
<br>
When the live calls are made to test and at 200th or at around 250th call there
is a point where it took like 5-10 sec just to connect to the database and in
the mean time we get dead air for that period of time......how can we change
the type of connection that you mentioned? Or might be is it good to go with
dual quad core processor instead of just one inorder to handle the call
capacity as well as connections?<br>
<br>
Regards<br>
Sandesh.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Wed, Oct 21, 2009 at 2:21 PM, Steve Edwards &lt;<a
href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>&gt;
wrote:<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>On Wed, 21 Oct 2009, das
sandesh wrote:<br>
<br>
&gt; I tried getting our server setup for 400-500 simultaneous calls, calls<br>
&gt; were going through properly but at around 200-250 calls, mysql (connect<br>
&gt; ...) statement was taking at least 5-10 sec to connect to the database.<br>
&gt; I optimized all possible parameters in my.cnf:<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>This isn't a &quot;MySQL&quot; performance list and I'm not an
&quot;expert,&quot; but...<br>
<br>
I cobbled up a little C program that created 1,000 concurrent connections<br>
to my database and it takes 0.15 seconds on an &quot;AMD Phenom(tm) 8650<br>
Triple-Core Processor.&quot; I confirmed via netstat that there were 1,000<br>
connections. Opening and closing a single connection 1,000 times was still<br>
less than a second.<br>
<br>
This was connecting to &quot;localhost&quot; so it used the UNIX socket.
Changing to<br>
a TCP socket took 0.19 seconds.<br>
<br>
I'd look elsewhere -- it's not the MySQL connection that's the problem.<br>
<br>
How are you connecting? Is in in an AGI? What language are you using? What<br>
are you doing with MySQL? A few more details will help :)<br>
<br>
--<br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards &nbsp; &nbsp; &nbsp; <a href="mailto:sedwards@sedwards.com">sedwards@sedwards.com</a>
&nbsp; &nbsp; &nbsp;Voice: +1-760-468-3867 PST<br>
Newline &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;Fax: +1-760-731-3000<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com"
target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-users"
target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>