MIGRATEPAGES(8)
โจ NAME โจ
okay so bestie, the manual name here is migratepages, from the Linux Administrator's Manual, section 8 ๐ It's the tool that migrates the physical location of a process's pages ๐ง
๐ SYNOPSIS ๐
migratepages pid from-nodes to-nodes
๐ธ DESCRIPTION ๐ธ
okay so migratepages moves the physical location of a process's pages, and the process's virtual address space stays exactly the same ๐ญ The pages just get shuffled around in memory. This lets you change how far a process is from its memory, which is lowkey iconic. Performance can get a glow-up by moving a process's pages to the node where it's currently running โจ
If you give multiple nodes for from-nodes or to-nodes, it tries to keep the relative location of each page within each nodeset ๐ฆ For example, if you move from nodes 2-5 to 7,9,12-13, the preferred result is 2->7, 3->9, 4->12, and 5->13. Honestly the plan is only doable if there's enough memory free, so keep that in mind ๐
๐ Valid node specifiers ๐
allโ every node ๐numberโ one specific node number ๐ซถnumber1{,number2}โ node number1 and node number2 ๐number1-number2โ every node from number1 up to number2 โจ! nodesโ flips the selection, so you get the opposite of whatever the following specification picks ๐
๐ NOTES ๐
You need a NUMA policy aware kernel that supports page migration, which means Linux 2.6.16 or later ๐ฅ
Heads up bestie: if you call migratepages as a regular user without admin privileges (but you still have the right to modify the process), it will only move pages that are NOT shared with other processes ๐ญ
If you call it as root, or as a user with administrative privileges, it moves ALL the pages ๐
๐ง FILES ๐ง
/proc/<pid>/numa_mapsโ this is where you can find info about the NUMA memory use of a process ๐
๐ฆ COPYRIGHT ๐ฆ
Copyright 2005-2006 Christoph Lameter, Silicon Graphics, Inc. ๐ migratepages is under the GNU General Public License, v.2 ๐
โญ SEE ALSO โญ
numactl(8), set_mempolicy(2), get_mempolicy(2), mbind(2), sched_setaffinity(2), sched_getaffinity(2), proc(5), ftok(3), shmat(2), taskset(1) ๐ซถ
Okay bestie, that's the whole vibe โจ This page came from SGI, dated Jan 2005, and it's MIGRATEPAGES(8) forever ๐ ๐
๐ฆ where this page comes from
- alpine 3.22: numactl-doc 2.0.18-r0 ยท LGPL-2.1-only
- alpine 3.23: numactl-doc 2.0.18-r0 ยท LGPL-2.1-only
- alpine 3.24: numactl-doc 2.0.19-r0 ยท LGPL-2.1-only
- arch rolling: numactl 2.0.19-1 ยท GPL-2.0-only AND LGPL-2.1-only
- centos-stream 10: numactl 2.0.19-3.el10 ยท GPL-2.0-only
- centos-stream 9: numactl 2.0.19-3.el9 ยท LGPL-2.1-only and GPL-2.0-only
- debian trixie: numactl 2.0.19-1
- fedora 43: numactl 2.0.19-3.fc43 ยท GPL-2.0-only
- fedora 44: numactl 2.0.19-4.fc44 ยท GPL-2.0-only
- nixpkgs unstable: numactl 2.0.18
- opensuse-leap 16.0: numactl 2.0.19.14.g690a72c-160000.2.2 ยท GPL-2.0-only
- opensuse-leap 16.0: numactl 2.0.19.14.g690a72c-160000.2.2 ยท GPL-2.0-only
- opensuse-leap 16.0: numactl 2.0.19.14.g690a72c-160000.2.2 ยท GPL-2.0-only
- opensuse-leap 16.0: numactl 2.0.19.14.g690a72c-160000.2.2 ยท GPL-2.0-only
- ubuntu noble: numactl 2.0.18-1build1
- ubuntu noble: numactl 2.0.18-1ubuntu0.24.04.1
- ubuntu questing: numactl 2.0.19-1
- ubuntu resolute: numactl 2.0.19-1build1
- ubuntu stonking: numactl 2.0.19-1build1
- Copyright 2005-2006 Christoph Lameter, Silicon Graphics, Inc
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms