[solved] First Byte Time optimization?

Discussion in 'General' started by Crazy Serb, Sep 4, 2017.

  1. Crazy Serb

    Crazy Serb Active Member

    I've got a few websites that are getting a failing mark on First Byte Time on webpagetest.org and other page speed/load time tests, and I am wondering what settings in Litespeed we should tweak (and to what parameters) to optimize this further?
     
  2. NiteWave

    NiteWave Administrator

    any of the websites has enabled lscache ?
     
  3. Crazy Serb

    Crazy Serb Active Member

    No, they don't. Should they?

    I've tried them with LS Cache plugin (Wordpress) and the first byte results are still the same (failing marks), and not much has changed in that regard.
     
  4. NiteWave

    NiteWave Administrator

    can you do tests on a specific web site to illustrate the issue accurately ?

    using webpagetest.org as test tool
    1. under apache, the TTFB (Time To First Byte)
    2. under litespeed, the TTFB which not from cache (without response header: X-LiteSpeed-Cache:hit)
    3. under litespeed, the TTFB which from cache (with response header: X-LiteSpeed-Cache:hit)
     
  5. Crazy Serb

    Crazy Serb Active Member

  6. NiteWave

    NiteWave Administrator

    tried to cache, but faild. so same result as "Litespeed without Cache"
    only see headers like:
    x-litespeed-cache-control: public,max-age=604800
    x-litespeed-tag: 9061_URL.b315d12a9a6acd0b12d04b532e01b8e2,9061_F,9061_Po.802,9061_PGS,9061_
    but not see
    x-litespeed-cache:hit

    most likely cache root for the website has problem.
    ask your host to check the cache root for this website. in WHM/cPanel, default setting is /home/username/lscache.
    check with
    #ls -l /home/username/lscache
     
  7. Crazy Serb

    Crazy Serb Active Member

    A-ha! Found what it was... the cache files in /home/username/lscache folder were old and not updated with the new files, for whatever reason... or something was off. So I deleted that folder and all the content in it, re-enabled the latest LSCache, and voila - first byte time went from an F to an A.

    Thank you for the help locating the issue...
     
    NiteWave and Michael A like this.
  8. Crazy Serb

    Crazy Serb Active Member

    Ok, issue with First Byte timing again... it's taking 1.2 seconds to load a simple 50Kb HTML page + about 100Kb in javascripts/jquery scripts:

    https://gtmetrix.com/reports/positiveparentingsolutions.com/Hpe8bZAI
    https://www.webpagetest.org/result/180919_0R_6ab676bb7c1bbf24c30b12412933e6fc/


    It makes no sense whatsoever... and I tested it on both GTMetrix and Webpagetest.org and the results are pretty similar.

    No cache in place, obviously, as it's a static HTML file... so any ideas what I'd need to look at here, or optimize/tweak?
     
    Last edited by a moderator: Sep 19, 2018
  9. Pong

    Pong Well-Known Member Staff Member

  10. Crazy Serb

    Crazy Serb Active Member

    Oh, sorry, I had it set to mobile device & 3G network testing... ugh, so silly. My bad.
     
  11. Pong

    Pong Well-Known Member Staff Member

    No worries.
     

Share This Page