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

Scaling approach changes

For many years, the speed and processing capacity of computers increased at an exponential rate. The observation that the number of transistors in a dense integrated circuit doubles approximately every two years is known as Moore's Law, named after Gordon Moore of Intel. Sadly, this era is no "Moore" (sorry). Although transistor density is still increasing, single-core processor speeds have flattened out, and these days increases in processing ability come from scaling out to multiple cores, multiple CPUs, and multiple machines (both virtual and physical). Multithreaded programming is no longer exotic; it is essential. Otherwise, you cannot hope to go beyond the capacity of a single core. Modern CPUs typically have at least four cores (even on mobile devices). Add in a technology such as hyper-threading and you have at least eight logical CPUs to play with. Naive programming will not be able to fully utilize these.

Traditionally, performance and redundancy was provided by improving the hardware. Everything ran on a single server or mainframe, and the solution was to use faster hardware and duplicate all components for reliability. This is known as vertical scaling, and it has reached the end of its life. It is very expensive to scale this way and impossible beyond a certain size. The future is in distributed and horizontal scaling, using commodity hardware and cloud computing resources. This requires that we write software in a different manner than we did previously. Traditional software can't take advantage of this scaling as it can easily use the extra capabilities and speed of an upgraded computer processor.

There are many trade-offs that have to be made when considering performance, and it can sometimes feel like more of a black art than science. However, taking a scientific approach and measuring results is essential. You will often have to balance memory usage against processing power, bandwidth against storage, and latency against throughput.

An example is deciding whether you should compress data on the server (including what algorithms and settings to use) or send it raw over the wire. This will depend on many factors, including the capacity of the network and the devices at both ends.

主站蜘蛛池模板: 洪雅县| 望谟县| 喀喇沁旗| 云林县| 西贡区| 昌吉市| 景东| 汉沽区| 个旧市| 丹阳市| 丁青县| 洛宁县| 和平区| 什邡市| 固镇县| 镇原县| 白城市| 安塞县| 丹阳市| 莱芜市| 龙里县| 葵青区| 贡山| 崇礼县| 黄浦区| 电白县| 营山县| 康乐县| 积石山| 乐东| 禄劝| 商南县| 辽宁省| 云霄县| 阜阳市| 闽清县| 大余县| 洛宁县| 临西县| 大悟县| 招远市|