[SERVER-51233] Warn on startup if vm.max_map_count < 2 * max connections Created: 30/Sep/20  Updated: 29/Oct/23  Resolved: 27/Sep/21

Status: Closed
Project: Core Server
Component/s: Diagnostics, Logging
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Eric Sommer Assignee: Vojislav Stojkovic
Resolution: Fixed Votes: 0
Labels: sa-groomed, save-for-alex, save-for-vojislav
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-55068 Max incoming connections currently se... Open
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2021-06-14, Service Arch 2021-06-28, Service Arch 2021-09-20, Service Arch 2021-10-04
Participants:
Case:
Story Points: 2

 Description   

In our production notes we recommend setting:

vm.max_map_count value of 128000

This corresponds to our default max connections of 64k, as each connection requires 2 maps.

Upon startup, the mongod should check this value (/proc/sys/vm/max_map_count) and warn if it doesn't equal 2*max connections.

 

Acceptance Criteria: We warn users that vm.max_map_count doesn't exceed 2x max connections 



 Comments   
Comment by Billy Donahue [ 28/Sep/21 ]

code review took place here:
https://github.com/mongodb/mongo/pull/1421
Linked for posterity

Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Vojislav Stojkovic', 'email': 'vojislav.stojkovic@mongodb.com', 'username': 'vstojkovic-mongodb'}

Message: SERVER-51233 Warn on startup if vm.max_map_count is too low
Branch: master
https://github.com/mongodb/mongo/commit/4ea51acda7d7659cb75dfdc6ed463bc5104c8238

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'Vojislav Stojkovic', 'email': 'vojislav.stojkovic@mongodb.com', 'username': 'vstojkovic-mongodb'}

Message: SERVER-51233 Warn on startup if vm.max_map_count is too low
Branch: server-51233
https://github.com/mongodb/mongo/commit/2bc0c12afc214d31d0c4bbbdf27df46c3e2050c3

Generated at Thu Feb 08 05:24:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.