NYCPHP Meetup

NYPHP.org

[nycphp-talk] Performance testing advice

Max Gribov max at neuropunks.org
Fri Nov 2 17:09:00 EDT 2007


Cliff Hirsch wrote:
>>
>> May be your code needs to initiate a DB connection? You could try using
>> persistent connections.
>> DNS lookups could be it too.
>>     
>
> It does initiate a DB connection. Bt thru a socket on the same server.
> Shouldn't take that long. No persistent DB connections. I've heard they can
> be troublesome.
>
> DNS lookups only took a17 to 300ms, although I just tested this -- not first
> hit of the day.
>   

You can try to telnet to port 80 from some other  network to the
webserver using webserver's DNS name and issue "get /" request. It will
spit out an error back since its not entirely correct syntax, but you
can see how long that will take. This will bypass your code, and will
indicate if a problem is on network/apache level.

Are you using any caching engines like smarty? I dont really see how,
but that may cause a problem like this.

Do any other services lag in response, like SSH or SMTP or some other
tcp service?..

You can also put in debug statements using microtime() into your code to
see how long execution of certain components takes, and placing those
calls strategically can point to some sort of bottleneck in your code.

Since i've never seen the code, apologies if you've tried these things
already or if they arent applicable.

Check out this thread on microtime()/performance:
http://www.webmasterworld.com/forum88/2567.htm

As a side note on firefox plugins like firebug, i found liveheaders to
be very useful in all sorts of troubleshooting,
https://addons.mozilla.org/en-US/firefox/addon/3829


>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>   




More information about the talk mailing list