<?xml version="1.0" encoding="windows-1252"?>
<node id="989959" title="Re^3: mod_perl vs php performance when accessing Oracle under load" created="2012-08-27 06:38:48" updated="2012-08-27 06:38:48">
<type id="11">
note</type>
<author id="422741">
amasidlover</author>
<data>
<field name="doctext">
&lt;p&gt;I'm now struggling to get NYTProf to do what I need it seems to be only writing one request's worth of data when actually I'm expecting it to write 300 files all with 10 or so requests in.&lt;/p&gt;
&lt;code&gt;
PerlModule Devel::NYTProf::Apache
PerlSetEnv NYTPROF file=/tmp/nytprof.out:addpid=1:endatexit=1
&lt;/code&gt;
&lt;p&gt;I can't really set MaxClients to 1 as the large response times don't occur without the concurrency.&lt;/p&gt;
&lt;p&gt;The timings that are written out show a total of only just over 100ms even including the DB connect - which I assume I'm getting because its only logging my first request. Excluding the connect its about 30ms of time.&lt;/p&gt;
&lt;p&gt;What I'm struggling with is how to translate one request into concurrent requests (for the purposes of estimating timing) - particularly when I'm seeing requests that with no DB activity show 1700ms average response time and with DB calls in there show 1800ms average response time. It suggests to me that something outside of my handler is taking the majority of the response time up when concurrency gets 'high'&lt;/p&gt;
&lt;p&gt;The detailed results from 'ab' show the following:&lt;/p&gt;
&lt;code&gt;
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       48 1223 1633.2    918   14262
Processing:     2  611 368.2    573    1542
Waiting:        2  228 167.0    192     679
Total:         75 1833 1626.0   1705   14860
&lt;/code&gt;
&lt;p&gt;So the connect is definitely a big part...&lt;/p&gt;
&lt;p&gt;OOOPS!!! Just been back and double checked the PHP results - turns out the PHP version I'd missed the 's' in the URL i.e. http and not https.&lt;/p&gt;
&lt;p&gt;They now give similar results! Lets see if I can now do something productive with the other half of my day...&lt;/p&gt;
</field>
<field name="root_node">
989939</field>
<field name="parent_node">
989945</field>
</data>
</node>
