numastat to collect the memory consumption
Displays Memory statistics for each NUMA(Non-Uniform Memory Architecture) node
$ numastat node0
numa_hit 2419687
numa_miss 0
numa_foreign 0
interleave_hit 17197
local_node 2419687
other_node 0
Output items
numa_hit: The expected memory was successfully allocated on this node
numa_miss: Memory is allocated on this node, but the process uses a different node. Each numa_miss has a numa_foreign on another node
numa_foreign: The memory for the new node is actually allocated to other nodes, and each numa_foreign has a numa_miss on another node
interleave_hit: Memory that is expected to be successfully interleaved on this node
local_node: The memory allocated on a node when a process is running on the node
other_node: The memory allocated when a process is running on another node
Parameters
-c: Based on the data content when the table shrinks the width of the column, the memory is rounded to megabytes, which is helpful for systems that display multiple NUMA nodes more densely
$ numastat -c
o Per-node numastat info (in MBs):
o Node 0 Total
o —— —–
o Numa_Hit 1462 1462
o Numa_Miss 0 0
o Numa_Foreign 0 0
o Interleave_Hit 67 67
o Local_Node 1462 1462
o Other_Node 0 0
-m: Memory usage information is generated for each node
$ numastat -m
o Per-node system memory usage (in MBs):
o Node 0 Total
o ————— —————
o MemTotal 1992.20 1992.20
o MemFree 1503.52 1503.52
o MemUsed 488.67 488.67
o Active 201.73 201.73
o Inactive 193.01 193.01
o Active(anon) 111.65 111.65
o Inactive(anon) 5.83 5.83
o Active(file) 90.08 90.08
o Inactive(file) 187.18 187.18
o Unevictable 0.00 0.00
o …
-n:Display raw data statistics
$ numastat -n o Per-node numastat info (in MBs):
o Node 0 Total
o ————— —————
o Numa_Hit 1492.13 1492.13
o Numa_Miss 0.00 0.00
o Numa_Foreign 0.00 0.00
o Interleave_Hit 67.20 67.20
o Local_Node 1492.13 1492.13
o Other_Node 0.00 0.00
-p:Displays memory allocation information for each node for the specified process
$ sudo numastat -p 1264
o Per-node process memory usage (in MBs) for PID 1264 (docker-containe)
o Node 0 Total
o ————— —————
o Huge 0.00 0.00
o Heap 0.00 0.00
o Stack 2.14 2.14
o Private 9.62 9.62
o —————- ————— —————
o Total 11.77 11.77
-s:Lists the largest memory consumers in descending order
o $ numastat -s
o Per-node numastat info (in MBs):
o Node 0 Total
o ————— —————
o Numa_Hit 1514.71 1514.71
o Local_Node 1514.71 1514.71
o Interleave_Hit 67.20 67.20
o Numa_Foreign 0.00 0.00
o Numa_Miss 0.00 0.00
o Other_Node 0.00 0.00
-v This displays the details
-s The value 0 is ignored
$ numastat -z
o Per-node numastat info (in MBs):
o Node 0 Total
o ————— —————
o Numa_Hit 1535.98 1535.98
o Interleave_Hit 67.20 67.20
o Local_Node 1535.98 1535.98
pcm-memory command to collect the bandwidth from hardware counters.
Numa
NUMA (Non Uniform Memory Access Architecture) technology enables many servers to operate as a single system, while retaining the advantages of small systems that are easy to program and manage. Non-uniform Memory Access (NUMA) is a kind of computer memory design for multiprocessor. The memory access time depends on the memory location of the processor. Under NUMA, a processor can access its own local memory faster than non-local memory (the place of the memory to the processor or memory shared between another processor).
Optane
Chinese name “Aoteng”, is a new ultra-high speed memory technology, compatible with NVMe storage protocol. Optane is compatible with the NVMe (Non-volatile memory) storage protocol, which Apple already uses in some of its Macbooks.