383
Automatic NUMA balancing uses several algorithms and data structures, which are
only active and allocated if automatic NUMA balancing is active on the system, using a
few simple steps:
• A task scanner periodically scans the address space and marks the
memory to force a page fault when the data is next accessed.
• The next access to the data will result in a NUMA Hinting Fault. Based
on this fault, the data can be migrated to a memory node associated
with the thread or process accessing the memory.
• To keep a thread or process, the CPU it is using and the memory it is
accessing together, the scheduler groups tasks that share data.
Manual NUMA tuning of applications using numactl will override any system-wide
automatic NUMA balancing settings. Automatic NUMA balancing simplifies tuning
workloads for high performance on NUMA machines. Where possible, we recommend
statically tuning the workload to partition it within each node. Certain latency-sensitive
applications, such as databases, usually work best with manual configuration. However,
in most other use cases, automatic NUMA balancing should help performance.
Using Volume Managers with Persistent Memory
We can provision persistent memory as a block device on which a file system can be
created. Applications can access persistent memory using standard file APIs or memory
map a file from the file system and access the persistent memory directly through load/
store operations. The accessibility options are described in Chapters 2 and 3.
The main advantages of volume managers are increased abstraction, flexibility, and
control. Logical volumes can have meaningful names like “databases” or “web.” Volumes
can be resized dynamically as space requirements change and migrated between
physical devices within the volume group on a running system.
On NUMA systems, there is a locality factor between the CPU and the DRR and
persistent memory that is directly attached to it. Accessing memory on a different CPU
across the interconnect incurs a small latency penalty. Latency-sensitive applications,
such as databases, understand this and coordinate their threads to run on the same
socket as the memory they are accessing.
Compared with SSD or NVMe capacity, persistent memory is relatively small. If
your application requires a single file system that consumes all persistent memory on
Chapter 19 advanCed topiCs
Précédent

- 405/457

Suivant