LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

migratepages

moves the physical memory pages of a process from one set of NUMA

TLDR

Migrate pages from one node to another
$ migratepages [pid] [from_node] [to_node]
copy
Migrate all pages to specific node
$ migratepages [pid] all [2]
copy
Migrate to closest node
$ migratepages [pid] [0] best
copy

SYNOPSIS

migratepages pid from-nodes to-nodes

DESCRIPTION

migratepages moves the physical memory pages of a process from one set of NUMA nodes to another. This is useful for optimizing memory placement on NUMA systems.The command works on a running process and can migrate pages to improve memory locality.

PARAMETERS

pid

Process ID.
from-nodes
Source NUMA nodes (or 'all').
to-nodes
Destination NUMA nodes (or 'best').

Migrate PID 1234 from node 0 to node 1

migratepages 1234 0 1

Migrate from all nodes to node 2

migratepages 1234 all 2

Let kernel choose best destination

migratepages 1234 0 best

$
# CAVEATS

Requires numactl package. Process must be running. Migration can be slow. May require root. Only works on NUMA systems.

# HISTORY

migratepages is part of the **numactl** package, developed for controlling NUMA memory policies on Linux systems.

# SEE ALSO

numactl(8), numastat(8), mbind(2)

# INSTALL
copy
$ dnf: sudo dnf install numactl
copy
$ pacman: sudo pacman -S numactl
copy
$ apk: sudo apk add numactl-tools
copy
$ zypper: sudo zypper install numactl
copy
$ brew: brew install numactl
copy
$ nix: nix profile install nixpkgs#numactl
copy

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid