Memory Mountain is a comprehensive research tool for memory hierarchy. It reflects the different levels of bandwidth in the memory hierarchy. It also reflects the performance of a program with different temporal locality and spatial locality. By analyzing the data of the memory mountain, some hardware parameters of the memory system can be seen.
T. Stricker introduced the idea of memory mountain in his paper in 1997, using it to describe the memory system comprehensively, and put forward the term "Memory Mountain" in later work. Carnegie Mellon University Professor Randal Bryant's book "in-depth understanding of computer systems" (Computer SYSTEMS:A Programmer ' s perspective, Randal Bryant, Davido ' Hallaron) The concept of memory mountain is also presented in section 6th 6.1, and detailed analysis is made.
Memory mountain is a kind of memory mountain, the hierarchy mainly includes the cache and memory. Below is a memory mountain of the Intel i7 processor.
The upper-left corner of the graph is the CPU parameter, and the main parameter is the size of the three cache. This is crucial, because it is the three numbers that make the memory mountain appear in the diagram state.
First look at the axis, working set size refers to the working set, stride is to access the data step, stride is 1, is the sequential access to data, 2 is the interval of a visit, which is related to the local data. Read throughput refers to memory access speed, or efficiency, or throughput, in short, the higher the better the better.
OK, so you can take a look at the mountain. We look at the working set size, and we can see that the green and purple boundaries are about 32K, the green and yellow boundaries are about 256K, the light purple and blue borders are about 8M, which is exactly the size of the three cache. This is a good explanation, if the working set is so small that it can be fully loaded into the first cache, then the access speed is almost the speed of the level 1 cache. So there is a sharp descent at the cache size boundary. Formed a four-layer structure in the diagram.
Judging from stride, the longer the step, the slower the speed. The long-stride access method completely destroys the time locality, thus causing the access speed to decrease.
In general, I want to be able to describe a few things clearly. First, when the stride length is very small, even if the working set is large, the access rate is in the purple area. This is because, taking full advantage of the time locality, the data within the same cache block, only the first one has miss, and after this miss, the other data is loaded together. Second, when the stride size is very large, the working set is very small and the access speed is very high. In fact, the step size here does not affect the speed of access, because the entire working set will be loaded into the cache. Third, for large work sets and large stride size, then the cache is a dummy, because there is no locality, the cache is for local, so the access speed can only be memory level, that is, the light blue in the diagram.
The memory mountain can be tested, and deeper theories and experiments can be made for reference:
http://www.opengpu.org/forum.php?mod=viewthread&tid=975
Memory Mountain Introduction and schematic analysis