[Cialug] decreasing website latency
chris
arreyder at apache.org
Thu Nov 4 10:33:10 CDT 2010
On 11/04/2010 08:15 AM, Matthew Nuzum wrote:
> I have a simple "hello world" php web page. When I do a wget
> https://.../index.php (it is an ssl website) it takes .477 seconds.
> Ping time is .060 seconds.
>
> Any suggestions on what I can do to decrease latency? The apache
> server has (and needs) PHP. The phpinfo() page shows a lot of modules
> I don't need but I don't see them listed in php.ini. Currently using
> xcache, mod_php and mod_rewrite. Also, the SSL certificate is chained,
> does that affect performance? I'm very motivated to cut that latency
> in half or better. The site will be hosting dynamic content but I'm
> targeting an app that really needs to feel snappy and I think that
> will be challenging with half a second of latency.
>
> /me does a quick test on a non-ssl website...
>
> Ah, latency is down to .147 seconds on the http version of the site on
> the same server. So I guess my focus need to be on optimizing ssl.
> That also makes me wonder if wget is a good tool for testing ssl
> website latency.
>
>
Hi Matt,
Not sure if this has been suggested yet, but here is how I find my non
network latency in applications under Apache Httpd:
Assuming you are running a non threaded mpm (prefork and not worker or
event) you can do this:
1) stop httpd.
2) strace httpd -X (Launches a single httpd process and stay in the
foreground.)
3) Go to your browser and issue what ever your slow request is and watch
things happen! You can also log the output with strace -o <filename>
httpd -X but I usually like to watch it scroll by the first time. This
will show you every thing that's going on and help you look for stuff to
eliminate.
Good luck and feel free to hit me up on IRC if you have questions.
crr/arreyder at apache.org
More information about the Cialug
mailing list