1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to reduce 'Time to First Byte' ?

Discussion in 'Black Hat SEO' started by Penumbra, Oct 21, 2015.

  1. Penumbra

    Penumbra Power Member

    Joined:
    Apr 23, 2014
    Messages:
    743
    Likes Received:
    226
    Location:
    Antarctica
    I have tried many hosting's including siteground and all of them have high time to first byte, from 500ms to 1 minute, i tried maxcdn, cloudflare, optimizing the shit out of the website but still high, i think it's server issue, what is solution to this?
     
  2. powpownow

    powpownow Newbie

    Joined:
    Oct 7, 2015
    Messages:
    35
    Likes Received:
    3
    I`m currently in the same situation.. contacted hosting support, they said I should dilute my hosting account, clearing databases and whatnot.. nothing worked, to be honest.. I hate people that have a loading of under 1 sec for their website :p
     
  3. ziplack

    ziplack Supreme Member

    Joined:
    Feb 18, 2010
    Messages:
    1,307
    Likes Received:
    674
    Location:
    BHW
    could be a cms issue
     
  4. array90

    array90 Registered Member

    Joined:
    Oct 17, 2015
    Messages:
    50
    Likes Received:
    5
    Try enabling cache, WP Rocket works great if you are on wordpress. If it can't serve up a cached flat file fast you either have a ton of traffic and are overloaded or something dire is going on....
     
  5. roadhamster

    roadhamster Regular Member

    Joined:
    Mar 12, 2012
    Messages:
    348
    Likes Received:
    248
    OP, have you tested it with a plain flat html file with only some text, no database calls, no scripts and no css inside? Makes a huge difference, because when you test it with for eample wordpress site, worpress makes a lot of calls to database, often loads a lot of javascript, css's and so on. Maybe your issue is the mysql server, apache or whatever can be.
    You're on shared hosting? Get a vps and watch the increase of speed.
     
    • Thanks Thanks x 1
  6. davids355

    davids355 Jr. VIP Jr. VIP

    Joined:
    Apr 25, 2011
    Messages:
    10,422
    Likes Received:
    8,125
    How do you check or measure that? I am interested to see what its like on one of my sites....
     
  7. roadhamster

    roadhamster Regular Member

    Joined:
    Mar 12, 2012
    Messages:
    348
    Likes Received:
    248
    http://www.bytecheck.com/
     
    • Thanks Thanks x 4
  8. davids355

    davids355 Jr. VIP Jr. VIP

    Joined:
    Apr 25, 2011
    Messages:
    10,422
    Likes Received:
    8,125
    Interesting comparison between a few providers that I use (similar sites each but I am guessing actually, time to first byte is Dependant only on hosting, infrastructure, dns etc and NOT on website, CMS etc):

    0.398 for A2 hosting, 0.489 for hostwinds, 0.284 for 1and1 (Surprising as they are in US but I guess they have local CDN?), 0.214 for hostgator (Surprising as they are in US but I guess they have local CDN?), 0.482 for krystal hosting (Surprisingly slow as they are in UK and very local to me).
     
  9. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,774
    Likes Received:
    11,429
    Occupation:
    COINZ
    Location:
    BUYAH
    Home Page:
    You look up and you see a cloud and the fireworks and the skies form a big flare that instantly blinds you but when you look again you notice that you've been enlightened.

    Edit: Just tested using http://www.bytecheck.com/
    Your Time To First Byte is: 0.292 seconds
     
    Last edited: Oct 22, 2015
  10. Apricot

    Apricot Administrator Staff Member Moderator

    Joined:
    Mar 26, 2013
    Messages:
    13,541
    Likes Received:
    8,510
    Gender:
    Female
    Occupation:
    BHW Admin
    Location:
    Station 2E
    Home Page:
    ^This. So much.

    TTFB delays are caused by one of the following:
    Traffic
    network issues
    Server specs and configuration
    content delivery method

    Basically, test the things you can easily control. Once those are ruled out, you can move on till you know what it is. What's your hosting? Do you have shell access to your VPS? Or even webmin/cpanel etc?

    If so, the two things you can control are content delivery and server config. Test it with static content. If TTFB's fine, you either have a problem with the code itself or how the server deals with the code.

    Try creating a vanilla wp site in a directory on the server. Fill it with sample content. If TTFB's good, then your problem is the code itself. If TTFB's not much better, then the problem's with your server.

    Try caching the site. There are WP plugins like W3total or supercache. If you're using apache, look at a module called varnish which can be configured to work with the WP plugins and sits in front of the webserver to speed up delivery of the cached content.

    Check the php memory limit. If it's too low, you'll get errors. If it's too high and there's an infinite loop in your code, it'll kill the server fairly quickly. Check the logs, if there's memory errors, you probably need to increase the limit.

    Check php.ini file and look for a line with:
    Code:
    memory_limit = 32M 
    and change as necessary. 32Mb is ok for core. 64M should be enough for a clean site with up to 20 plugins. If you're having to go up to 128M or 256M it's probably worth looking at your themes and plugins. De-activate them all and activate one by one, checking as you go.

    Should help narrow it down. But ultimately, if the ttfb's bad with static or vanilla WP install, then you need to have a word with your host. If it isn't, it's worth tracking down the issues, even if you decide decide to use a cdn.
     
    • Thanks Thanks x 5