- Mastering The Faster Web with PHP,MySQL,and JavaScript
- Andrew Caya
- 332字
- 2021-06-25 21:16:53
Before Measuring
When discussing speed measurement, it is always important to remember that speed always ultimately depends on hardware and that poorly performing software is not necessarily a problem if it is running on a poorly performing hardware infrastructure.
Of course, input and output (I/O) always accounts for the better part of the hardware infrastructure's aggregate latency. The network and the filesystem are the two main possible bottlenecks that will offer the worst possible performance when it comes to speed. For example, accessing data on the disk can be up to a hundred times slower than random-access memory (RAM) and very busy networks can make web services practically unreachable.
RAM limits also force us to make certain tradeoffs when it comes to speed, scalability and accuracy. It is always possible to get top-speed performance by caching the greater part of an application's data and loading everything into memory. But will this be the optimal solution in all circumstances? Will it still maintain speed in the context of a heavy workload? Will the data be refreshed adequately in the context of highly volatile data? The obvious answer to these questions is probably not. Thus, optimal speed is the balance between pure speed, reasonable memory consumption and acceptable data staleness.
Measuring performance in order to determine the optimal speed of a computer program is the art of finding the perfect balance in the context of particular business rules and available resources by implementing the appropriate tradeoffs and fine-tuning them afterwards.
The first step of assessing speed performance will therefore be to analyze available resources and determine the upper and lower limits of our hardware's speed performance. And since we are working on web performance, this first step will be accomplished by benchmarking the web server itself.
The second step will consist of profiling the web application in order to analyze the performance of each part of its inner workings and determine which parts of the application's code lack perfect balance and should be optimized.
- Java多線程編程實戰指南:設計模式篇(第2版)
- JavaFX Essentials
- Python爬蟲開發與項目實戰
- Learning Laravel 4 Application Development
- 零基礎學MQL:基于EA的自動化交易編程
- Visual C++應用開發
- 學習正則表達式
- Android系統級深入開發
- Java SE實踐教程
- Arduino機器人系統設計及開發
- Learning Cocos2d-JS Game Development
- Java多線程并發體系實戰(微課視頻版)
- Java 9:Building Robust Modular Applications
- HTML5 and CSS3:Building Responsive Websites
- Django 3 Web Development Cookbook