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

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.

主站蜘蛛池模板: 都昌县| 三亚市| 永和县| 荃湾区| 阳泉市| 满洲里市| 伊春市| 永春县| 邮箱| 鹿泉市| 文山县| 五指山市| 尤溪县| 麦盖提县| 广州市| 济宁市| 海门市| 东丽区| 英山县| 湟中县| 东阳市| 岚皋县| 湖口县| 荣成市| 固原市| 淮安市| 祁连县| 永吉县| 温州市| 城口县| 同江市| 南平市| 曲松县| 丰镇市| 荔波县| 吴桥县| 神池县| 惠安县| 青海省| 凌源市| 蓬莱市|