[DOCS-13235] Investigate changes in SERVER-44282: Set NUMAPolicy in systemd unit Created: 20/Nov/19  Updated: 30/Oct/23  Resolved: 03/Feb/20

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Andrew Feierabend (Inactive)
Resolution: Fixed Votes: 0
Labels: docs-administration
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-44282 Set NUMAPolicy in systemd unit Closed
Participants:
Days since reply: 4 years, 1 day ago
Epic Link: DOCSP-1769

 Description   

Description

Downstream Change Summary

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.)



 Comments   
Comment by Githook User [ 11/Feb/20 ]

Author:

{'username': 'andf-mongodb', 'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-13235 add systemd numactl override instructions
Branch: v4.2
https://github.com/mongodb/docs/commit/8ad417eb90963bd6efe5076c28bec50bb2dbdeaf

Comment by Githook User [ 03/Feb/20 ]

Author:

{'name': 'Andrew Feierabend', 'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-13235 add systemd numactl override instructions
Branch: v3.6
https://github.com/mongodb/docs/commit/3d442e3193090d68221ac18bc3cdfab169a86ffc

Comment by Githook User [ 03/Feb/20 ]

Author:

{'username': 'andf-mongodb', 'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-13235 add systemd numactl override instructions
Branch: v4.0
https://github.com/mongodb/docs/commit/a3811f2674b2619cb2717f8ef977f3055975756f

Comment by Githook User [ 03/Feb/20 ]

Author:

{'name': 'Andrew Feierabend', 'username': 'andf-mongodb', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-13235 add systemd numactl override instructions
Branch: v4.2
https://github.com/mongodb/docs/commit/8ad417eb90963bd6efe5076c28bec50bb2dbdeaf

Comment by Githook User [ 03/Feb/20 ]

Author:

{'username': 'andf-mongodb', 'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com'}

Message: DOCS-13235 add systemd numactl override instructions
Branch: master
https://github.com/mongodb/docs/commit/85dac3ac6ec3ae54c240d0c08231fc87c1d511b0

Comment by Mathew Robinson (Inactive) [ 22/Nov/19 ]

Just a note: for non-systemd setups that use SysV init (which is Linuxes older than RHEL 7 generally) we do automatically detect and use numactl if it's available.

Generated at Thu Feb 08 08:07:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.