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

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.

主站蜘蛛池模板: 沙坪坝区| 当阳市| 延川县| 海盐县| 读书| 奎屯市| 中江县| 安丘市| 化德县| 原阳县| 卓尼县| 扶沟县| 晋州市| 沅陵县| 闻喜县| 监利县| 乌兰察布市| 邯郸县| 登封市| 门头沟区| 社旗县| 永善县| 麻栗坡县| 大同县| 顺义区| 宕昌县| 昆山市| 赤峰市| 盖州市| 怀宁县| 白河县| 托克逊县| 玉门市| 通道| 石林| 多伦县| 紫阳县| 潜江市| 中方县| 和龙市| 张家港市|