官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 乡城县| 沂源县| 哈密市| 那坡县| 古蔺县| 黔西县| 廉江市| 寿宁县| 泊头市| 九龙城区| 迁安市| 中卫市| 安龙县| 赤峰市| 禄丰县| 东莞市| 岳西县| 松溪县| 中西区| 旬阳县| 神木县| 利川市| 康乐县| 万年县| 友谊县| 仲巴县| 大田县| 祥云县| 奉化市| 碌曲县| 喀喇沁旗| 西林县| 水富县| 忻城县| 神池县| 德惠市| 高邑县| 南充市| 特克斯县| 高安市| 来凤县|