This subdirectory contains benchmarks that have been modified to make it easy to test CXL memory.
Build instructions are in the sections below for each benchmark.
Note that it might be necessary to install prerequisite packages such as compilers and development tools to complete these builds.
If your CXL memory is in device DAX mode,
you can test it by running benchmarks on the DAX device (e.g. /dev/dax0.0
).
In this configuration, the "memory under test" is the CXL memory, but the benchmark code is running from system DRAM.
If no DAX devices are visible, your memory may be "online" as a NUMA node.
In this case, you can still use the numactl
program to run benchmarks on the CXL NUMA node.
See Testing CXL memory via NUMA.
If your CXL memory is in system RAM mode,
you can test it by using numactl
to set the memory placement policy of the benchmark application.
See Using CXL Memory as System RAM for an example of locating which NUMA node your CXL memory resides on.
The Memory Latency Checker (mlc
) program from Intel is a valuable tool for understanding memory
performance. It is not open source, but can be freely downloaded from
this website.
mlc
only tests system DRAM and CXL memory via NUMA. It cannot be used to test CXL memory that is
in device DAX mode.
cd mlc/Linux
sudo ./mlc --latency_matrix
sudo ./mlc --bandwidth_matrix
Multichase is a graph analysis / pointer chasing benchmark. Documentation can be found here..
Building multichase
requires the cmake
package and a C++ compiler (such as g++
) installed on the system.
cd multichase
make all
./multichase
When running multichase with the -d <daxdev>
argument, the memory-under-test is allocated from
the DAX device, but all other memory used by the benchmark (code, stacks, local data) is allocated
from system DRAM.
sudo ./multichase -d <dax-device>
numactl --membind <node> ./multichase
STREAM is a benchmark for measuring sustained memory bandwidth. Documentation can be found here.
Building stream
requires a C compiler (such as gcc
) installed on the system.
cd STREAM
make all
./stream -a 1000000000
When running stream
with the -d <daxdev>
argument, the memory-under-test is allocated
from the DAX device, but all other memory used by the benchmark (code, stacks, local data) is
allocated from system DRAM.
sudo ./stream -a 1000000000 -d <dax-device>
numactl --membind <node> ./stream -a 1000000000
Stressful Application Test (stressapptest
) is a memory load testing tool.
Documentation can be found here.
Building stressapptest
requires a C++ compiler (such as g++
) installed on the system.
cd stressapptest
./configure && make -j`nproc`
src/stressapptest
When running stressapptest
with the -D <daxdev>
argument, the memory-under-test is allocated
from the DAX device, but all other memory used by the benchmark (code, stacks, local data) is
allocated from system DRAM.
sudo src/stressapptest -D <dax-device>
numactl --membind <node> src/stressapptest