Chapter 2. Reducing Time to First Byte
The "time to first byte" is the time it takes your server to generate a page, plus the time taken to move the first byte over the Internet to the browser. Reducing that time is important for visitor retention you want to give them something to look at, and provide confidence that they'll have the page in their browser soon.
Reducing time to first byte involves making better use of system resources such as memory and CPU. An added benefit of a more efficient code is that there will be less need to buy more hardware when traffic grows.
This chapter consists of two parts, as explained.
The first section Pinpointing bottlenecks shows how to pinpoint a number of common bottlenecks, including:
Memory pressures
Caching
CPU usage
Thread usage
Long wait times for external resources
You will see how to use system counters to get a better understanding of what is going on inside your code. This will help you prioritize the most promising areas, so that you use your time...