New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
reduce "wait until first byte" time?
Hi!
^ this page speed loading test, among others, has always shown me a relatively long "wait" time. Is there a way to reduce it or is that just how PHP/MySQL work?
My setup is basically: Debian 7, apt-get install nginx php5-fpm mysql-server, Wordpress
My page loads in 900ms , half of which is wait time.
Thanks
Comments
Cache things so that the db doesn't get hit all the time.
This is it. I get this question A LOT from people who think it's related to latency or server performance. It absolutely can be, but more often than not it is related to the time required to generate a heavy dynamic page before the headers can be returned to the visitor. Static caching to avoid unnecessary dynamic processing is key.
For Wordpress, this is simply an effective caching plugin. Keep in mind that other plugins and sometimes excessive Ajax calls in themes can render this ineffective.
If you use W3 Total Cache, do not use object or database caching without memcached.
So there is no way to tune PHP/MySQL? It seems like they each add ~200ms to latency. I'd be happy if I could cut that in half.
That you're using PHP and MySQL for each request would be the largest problem. You can tweak them, but those do nothing to reduce the weight of what they are doing. Instead, bypass them with static caching and reduce the weight of your application. Optimizing those other things won't be that effective in the end.
Opcode caching?
apt-get install php-pear build-essential php5-dev
pecl install zendopcache
Cache everything possible. Images, css, js even some HTML. Have PHP template cache CACHE EVERYTHING