'Communication speed inside the PC' that the programmer should know



The PC operates while exchanging data with each other, such as the CPU that is in charge of calculation, the memory for temporary data storage, and the storage for long term storage such as HDD and SSD. The communication speed inside the PC is gathered at the site " Latency Numbers Every Programmer Should Know ".

Numbers Every Programmer Should Know By Year
https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html

Each speed is represented by the number of color-coded blocks (■) as shown below.



The CPU, L1 / L2 etc caches are performing high speed communication inside the PC. These caches are installed in the CPU to fill up the speed difference between CPU and memory. You can see the detailed role by reading the following article.

Why does the CPU have multiple cache levels such as L1, L2, L3? - GIGAZINE



The L1 cache can exchange data with the CPU in just a moment of 1 ns (nanoseconds), that is, one billionth of a second, as the speed is only a life. Looking at the items below two, you can see that the L2 cache can be accessed with 4 ns. Also, "Branch mispredict" which is sandwiched is about " speculative execution " which became a problem by causing a vulnerability called spectre in the beginning of 2018. Speculative execution predicts and executes the next instruction without waiting for judgment of the conditional branch, but if the prediction of this instruction is incorrect it will waste the calculated time of 3 ns . 3 ns corresponds to about 10 clocks in the case of 3.6 GHz CPU. The last "Mutex lock / unlock" is the time taken to acquire and release the exclusive control right (lock) of the shared cache data.



The blue "■" represents 100 ns that is 100 times the black "■". Access to main memory takes 100 ns. The blue "■" 10 indicates 1 μs (microseconds), that is, one millionth of a second, and it can be seen that it takes 2 μs to compress a 1 KB file.



The figure shows that it takes only 88 ns to transmit 2000 bytes (bytes) of data, but this is probably considered to indicate that the switch used at the data center etc. processes data at 200 Gbps I will. If you use a 200 Gbps line you can send data at 80 ns per 2000 byte. It takes 16 μs for random read access of SSD and 5 μs to sequentially read 1 million bytes of data stored consecutively from main memory. Also, it takes 500 μs for computers to make one round trip of data in the data center.



The red "■" represents 1 ms (milliseconds), that is, 1 / 1000th of a second. It takes 78 μs to sequentially read 1 million bytes of data from the SSD. The seek, which is the time to align the position of the head when the HDD reads data, takes 3 ms, it takes 1 ms to sequentially read 1 million bytes. Compared with the top two SSD items, you can see that SSD is very good for read access. The round-trip of packets between Canada and the Netherlands takes 150 ms. 150 ms is about one seventh of a second, it is slow enough to experience.



Also, by moving the slide bar at the top of the screen, you can see how the past speed was going back until 1990.



The following is the state of 2008. As compared to 2018, storage access speed is several times slower, you can see that the storage evolves greatly in 10 years, but on the other hand you can see that there is almost no change except for storage.



A further 10 years ago, confirmed in 1998, the number of "■" has increased largely as a whole, and it turns out that the performance of the computer has greatly evolved from 1998 to 2008 .



When I go back to 1990, the entire screen is filled with "■".



In addition, more information that volunteers have corrected / added are published to Github.

in Web Service,   Hardware, Posted by log1d_ts