- Joined
- Sep 15, 2014
- Messages
- 4,341
- Likes
- 8,855
- Degree
- 8
To test time to first bytes when on a Linux, Unix, or Mac OS X operating system run the following command:
One-line version:
It will give you the following output:
I'm not really confident in the hosting of BuSo IMO - coming in at 0.755 seconds, yikes. The 2nd and 3rd tests were better. Averaging the 3 is best. Explanation of the output:
--
Lookup Time: time, in seconds, it took from the start until the name resolving was completed.
Connect Time: time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
AppCon Time: time, in seconds, it took from the start until the SSL connect/handshake to the remote host was completed.
Redirect Time: time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started; it computes the full execution time for multiple redirections.
Pre-transfer Time: time, in seconds, it took from the start until the file transfer was just about to begin.
Start-transfer Time: time, in seconds, it took from the start until the first byte was just about to be transferred.
Total Time: total time, in seconds, that the full operation lasted (millisecond resolution).
Credit: How to Test Website Loading Speed in Linux Terminal
--
It's a good idea to check the TTFB against the Top 10 competitors within the search results to see if you are in-line with them or not. Faster is always better - Especially on Mobile!
--
Important: When you use the Google PageSpeed Test (https://developers.google.com/speed/pagespeed/insights/) it gives an important output for Mobile called "First Contentful Paint" - that's important since that signals when a user starts seeing something/anything on the screen. This is why Google is always telling you to defer this and that stuff - so a user can see something/anything on the screen so they know things are happening.
Imagine your own scenario where you click a button and you have zero clue whether something is happening or not, what do you do? Click the button again. If nothing happens after 1-3 seconds you hit the back button or reload the page.
Something to really pay attention to is the time difference between the "Pre-Transfer Time" and the "Start-Transfer Time". That's your server's response to EACH user's HTTP request - every image, CSS file, HTML file, Javascript file - all of it. I've seen instances of where the pre-transfer time was at 0.28 yet the start transfer was 0.56 - literally double - that's insane because that's happening for EACH file being transferred. In those instances the experience of the user will see a very slow site when on non-WiFi mobile. Also - if you are coming in over 1 second - yikes!
I suggest doing this test for every page, not just your homepage, but every major pillar page and blogpost. You might notice something acting up on certain pages and should investigate.
curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup} seconds\nConnect Time:\t\t%{time_connect} seconds\nAppCon Time:\t\t%{time_appconnect} seconds\nRedirect Time:\t\t%{time_redirect} seconds\nPre-transfer Time:\t%{time_pretransfer} seconds\nStart-transfer Time:\t%{time_starttransfer} seconds\n\nTotal Time:\t\t%{time_total} seconds\n' -o /dev/null https://www.buildersociety.com/
One-line version:
Code:
curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup} seconds\nConnect Time:\t\t%{time_connect} seconds\nAppCon Time:\t\t%{time_appconnect} seconds\nRedirect Time:\t\t%{time_redirect} seconds\nPre-transfer Time:\t%{time_pretransfer} seconds\nStart-transfer Time:\t%{time_starttransfer} seconds\n\nTotal Time:\t\t%{time_total} seconds\n' -o /dev/null https://www.buildersociety.com/
It will give you the following output:
I'm not really confident in the hosting of BuSo IMO - coming in at 0.755 seconds, yikes. The 2nd and 3rd tests were better. Averaging the 3 is best. Explanation of the output:
--
Lookup Time: time, in seconds, it took from the start until the name resolving was completed.
Connect Time: time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
AppCon Time: time, in seconds, it took from the start until the SSL connect/handshake to the remote host was completed.
Redirect Time: time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was started; it computes the full execution time for multiple redirections.
Pre-transfer Time: time, in seconds, it took from the start until the file transfer was just about to begin.
Start-transfer Time: time, in seconds, it took from the start until the first byte was just about to be transferred.
Total Time: total time, in seconds, that the full operation lasted (millisecond resolution).
Credit: How to Test Website Loading Speed in Linux Terminal
--
It's a good idea to check the TTFB against the Top 10 competitors within the search results to see if you are in-line with them or not. Faster is always better - Especially on Mobile!
--
Important: When you use the Google PageSpeed Test (https://developers.google.com/speed/pagespeed/insights/) it gives an important output for Mobile called "First Contentful Paint" - that's important since that signals when a user starts seeing something/anything on the screen. This is why Google is always telling you to defer this and that stuff - so a user can see something/anything on the screen so they know things are happening.
Imagine your own scenario where you click a button and you have zero clue whether something is happening or not, what do you do? Click the button again. If nothing happens after 1-3 seconds you hit the back button or reload the page.
Something to really pay attention to is the time difference between the "Pre-Transfer Time" and the "Start-Transfer Time". That's your server's response to EACH user's HTTP request - every image, CSS file, HTML file, Javascript file - all of it. I've seen instances of where the pre-transfer time was at 0.28 yet the start transfer was 0.56 - literally double - that's insane because that's happening for EACH file being transferred. In those instances the experience of the user will see a very slow site when on non-WiFi mobile. Also - if you are coming in over 1 second - yikes!
I suggest doing this test for every page, not just your homepage, but every major pillar page and blogpost. You might notice something acting up on certain pages and should investigate.