- 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.
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- HTML5 and CSS3 Transition,Transformation,and Animation
- Mastering macOS Programming
- INSTANT Mercurial SCM Essentials How-to
- Elasticsearch Server(Third Edition)
- MATLAB for Machine Learning
- C++20高級編程
- Scratch·愛編程的藝術(shù)家
- 深度探索Go語言:對象模型與runtime的原理特性及應(yīng)用
- Struts 2.x權(quán)威指南
- 深度實(shí)踐KVM:核心技術(shù)、管理運(yùn)維、性能優(yōu)化與項(xiàng)目實(shí)施
- Modernizing Legacy Applications in PHP
- Visual Basic 程序設(shè)計(jì)實(shí)踐教程
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- Practical Time Series Analysis