Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


reduce "wait until first byte" time?
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.

reduce "wait until first byte" time?

4n0nx4n0nx Member

Hi!

http://tools.pingdom.com/fpt

^ 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.

    Thanked by 34n0nx jar Gadelhas
  • jarjar Patron Provider, Top Host, Veteran
    edited May 2015

    @deadbeef said:
    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.

    Thanked by 24n0nx deadbeef
  • 4n0nx4n0nx Member

    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.

  • jarjar Patron Provider, Top Host, Veteran

    @4n0nx said:
    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.

    Thanked by 2deadbeef 4n0nx
  • vfusevfuse Member, Host Rep

    Opcode caching?

    apt-get install php-pear build-essential php5-dev
    pecl install zendopcache

    Thanked by 14n0nx
  • Cache everything possible. Images, css, js even some HTML. Have PHP template cache CACHE EVERYTHING

    Thanked by 14n0nx
Sign In or Register to comment.