[DOCS-10405] Add swappiness>0 recommendation to production notes Created: 18/Jun/17  Updated: 30/Oct/23  Resolved: 05/Mar/18

Status: Closed
Project: Documentation
Component/s: Ops Manager, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Tomer Yakir Assignee: Anthony Sansone (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/administration/production-notes/index.html#mongodb-on-linux


Issue Links:
Related
related to DOCS-11746 Wrong swappiness configuration recomm... Closed
Participants:
Days since reply: 5 years, 49 weeks, 2 days ago
Story Points: 0.3

 Description   

Hi,

“Swappiness” is a Linux kernel setting that influences the behavior of the Virtual Memory manager when it needs to allocate a swap, ranging from 0-100. A setting of “0“ tells the kernel to swap only to avoid out-of-memory problems. A setting of 100 tells it to swap aggressively to disk.

With kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over, a value of "0" may cause swap not be used. It's best to recommend having a setting of "1".



 Comments   
Comment by Githook User [ 05/Mar/18 ]

Author:

{'email': 'tony.sansone@mongodb.com', 'name': 'Tony Sansone', 'username': 'atsansone'}

Message: (DOCSP-1271, DOCS-10405): Updated Production Notes.
Branch: master
https://github.com/mongodb/docs/commit/93af212d7efa83beac44ba483909edc6ad650f4e

Comment by Anthony Sansone (Inactive) [ 14/Feb/18 ]

Adding this information to the MongoDB on Linux section.

Comment by Bruce Lucas (Inactive) [ 29/Sep/17 ]

Note that the default value of 60 has been observed to cause performance issues by paging mongod memory for no good reason. This article recommends a value of 10 for databases. We should add some advice regarding this to our production notes.

Comment by Tomer Yakir [ 19/Jun/17 ]

Hi pasette,

The OOM killer had killed the HEAD DB mongod processes (while it was building indexes) and swap wasn't used until swappiness was set to 1.
On these kernel versions, a setting of 0 may cause swap not to be used.

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