Verify NUMA nodes in /proc/numa
In this step, we will explore the /proc
filesystem to find information about NUMA nodes. The /proc
filesystem is a virtual filesystem that provides information about processes and other system information. It's a great place to find details about your Linux system's configuration and status.
Specifically, we will look at the /proc/numa
directory. This directory contains files that provide details about the NUMA configuration.
First, let's list the contents of the /proc/numa
directory using the ls
command. Type the following command in your terminal and press Enter:
ls /proc/numa
You should see output similar to this:
distance nodes
This indicates that there are two main files or directories related to NUMA in /proc
: distance
and nodes
.
Now, let's examine the contents of the /proc/numa/nodes
file. This file should list the available NUMA nodes. We can use the cat
command to display the content of this file. Type the following command and press Enter:
cat /proc/numa/nodes
You should see output similar to this:
0
This output confirms that your system has at least one NUMA node, which is node 0. If your system had more NUMA nodes, you would see a list of node numbers here (e.g., 0 1
).
Next, let's look at the /proc/numa/distance
file. This file shows the distance between NUMA nodes, which represents the cost of accessing memory on a different node. For a single-node system, the distance to itself is typically 10. Type the following command and press Enter:
cat /proc/numa/distance
You should see output similar to this:
0: 10
This output shows the distance matrix. In this case, 0: 10
means the distance from node 0 to node 0 is 10. On systems with multiple NUMA nodes, you would see a matrix showing the distance between all pairs of nodes.
Exploring the /proc
filesystem is a common way to gather system information in Linux. You've now seen how to use it to verify the NUMA nodes detected on your system.
Click Continue to move on to the next step.