Memory latency
什么是时延Latency
Latency是一个动作所花费的时间,我们做一个操作,比如:copy一个1G大小的文件,花了10秒,我们说Latency=10秒
Server从主存Main Memoory,读一个数据,然后再向主存Main Memory写一个数据,总计就是200ns。但实际上,会比这少很多,因为读写时,数据很可能已经在CPU cache中,如果是L1 Cache,那么只要不到2ns。
Memory latency is the time (the latency) between initiating a request for a byte or word in memory until it is retrieved by a processor. If the data are not in the processor’s cache, it takes longer to obtain them, as the processor will have to communicate with the external memory cells. Latency is therefore a fundamental measure of the speed of memory: the less the latency, the faster the reading operation.
Latency should not be confused with memory bandwidth, which measures the throughput of memory. Latency can be expressed in clock cycles or in time measured in nanoseconds. Over time, memory latencies expressed in clock cycles have been fairly stable, but they have improved in time.