-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
Description
We need to create some documentation that explains how to properly modify our SystemD service file to include numactl for systems using NUMA. The original SysV init scripts used to do this but very few customers, if any, are still using those as most Linux distros have phased that out in favor of SystemD.
The steps required are as follows:
- copy /lib/systemd/system/mongod.service to /etc/systemd/system/mongod.service
- modify /etc/systemd/system/mongod.service such that the line "ExecStart=/usr/bin/mongod --config /etc/mongod.conf" is now "ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf"
- run `systemctl stop mongod`
- run `systemctl daemon-reload`
- run `systemctl start mongod`
I'm not sure if the path to numactl is exactly correct (/usr/bin/numactl) or what the normal path for it is. That's just an educated guess as I don't have access to a NUMA enabled system.
Description of Linked Ticket
The legacy init scripts for mongod set the memory policy to interleave SERVER-3574
However the systemd units do not.
New versions of systemd support the NUMAPolicy=interleave directive. https://www.freedesktop.org/software/systemd/man/systemd.exec.html#NUMAPolicy=
Adding this configuration would minimize the differences between the init scripts and systemd unit files.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
- documents
-
SERVER-44282 Set NUMAPolicy in systemd unit
- Closed