What is the Intel Memory Latency Checker for?

Intel Memory Latency Checker is a small application from Intel for both Windows and Linuz, which allows us to measure the communication performance between the different cores of the CPU and RAM. In this article we make an introduction to it and what parameters it measures.

RAM is one of the essential components of the PC, since without it the CPU that executes the programs would not be able to function. That is why the tools to measure the performance between the CPU and the RAM, both when it comes to measuring bandwidth and latency, are welcome. The Intel Memory Latency Checker is one of them, and it does both.

Intel Memory Latency Checker

What is the Intel Memory Latency Checker?

The Intel Memory Checker is a small program that has a version for both Linux and Windows, in both cases it is not a program that works from a graphical interface, so you will have to run it from a terminal if you are on Linux or from PowerShell or the command prompt from Windows.

The Intel Memory Latency Checker is a small application that actually measures the latency between the system’s CPU and its RAM. Not only that, but it measures the latency of other elements communicating with the CPU and memory, as the MLC can be used for the following functions:

  • To measure the latencies between a specific memory address and one of the CPU cores.
  • We can measure the latencies of each of the cache levels with the Memory Latency Checker, and even measure the transfer latencies between cache and processor cache.
  • We can measure the bandwidth for different ratios of read and write operations with RAM.
  • Measure latency for random access to RAM rather than sequentially. That is, do not access consecutive memory addresses.
  • We can vary the size of the memory block with which we want to perform the benchmark, in order to measure latency according to the size of the data block.

The Intel Memory Latency Checker makes use of CPU threads in the following way: all the cores except one generate memory requests to overload the access to the RAM of the same, while the last core performs telemetry of when they take, that is to say , measures the actual latency of each transfer.

How to install Intel Memory Latency Checker?

Intel MLC

The process is very simple, first of all, once we have downloaded the file from the Intel website, we only need to unzip it, we recommend that you have 7-Zip installed as a decompressor , since it will allow you to directly unzip the file. The initial file is in extension tgz, when you unzip it you will get another file, in tar format, which you will have to unzip again to get the final folder, which should appear as follows on your PC.

If you double click on the folder called Windows you will get three files, select the files called mlc.exe and mlcdrv.sys and copy them. To install MLC you will only have to copy the files in the folder you want, since basically it is a portable application that only requires these two files to work. We have installed it in C: / Program Files (x86) / Intel MLC. Although for this we have needed to create the Intel MLC folder within the Program Files (x86) folder.

Through the command prompt and using MS-DOS commands we have navigated to the folder where we have the Intel MLC installed and we have written the MLC command to run the application. If the installation was successful, then the MLC will run running all its benchmarks one after the other.

Measuring latency with Memory Latency Checker

Contrary to what many people think, access to RAM depends on many factors, one of which is latency, which increases with contention. The term memory contention is understood to mean what happens when a CPU core or other component needs to access the system RAM, which creates additional delay and therefore increases latency.

If we want to measure latency when memory is busy, we just have to type mlc –idle_latency on the command line. Another way to measure latency is to ask all threads of the system except one to create memory requests, this can be done by typing mlc –loaded_latency on the command line.

Measuring bandwidth with Intel MLC

The Intel MLC is not only used to measure memory latency, but also memory bandwidth. The first of the commands is mlc –max_bandwidth which allows us to know the maximum bandwidth for different memory access scenarios.

The other command to measure the bandwidth is mlc –peak_injection_bandwidth which what it does is generate requests to memory from each of the cores at the maximum possible speed.

Measuring cache latency with Intel MLC

Intel MLC

The Intel MLC also allows us to measure the latency between the cores and the processor’s L2 cache or, failing that, with the last-level cache and therefore the one before the memory controller. To do this we just have to type in the command line mlc –c2c_latency.

Multi-processor measurements

Placa base doble socket

First of all, we must not confuse multiprocessor with multicore, since in the present case we are talking about a measurement between the different sockets with the RAM. For example, if we carry out the mlc –latency_matrix command to measure latency in an 8-core CPU for a laptop, what we will obtain is the following:

Which indicates that there is only one processor in the system, the same happens if we use the mlc –bandwidth_matrix command to measure the bandwidth.

So these options only work if we have a system with several processors and each one installed in its own socket, as is the case with the Intel Xeon or the AMD EPYC.

Disabling Intel Hyper Threading

These commands use all the threads of execution of the CPU, but if we want to measure the latency with a single thread of execution we need to use the parameter -X at the end of the command line, for example if we execute all the performance tests we will only have to write mlc -X .

Where X is the parameter within the Intel Memory Latency Checker that tells you to use a single thread of execution. We remind you in passing that there is a difference between lowercase and uppercase and that “X” in this case is uppercase. You can execute this parameter with any of the commands that we have described, so that you can know what the performance is between a processor and memory when multithreading has been deactivated.