Skip to content

Commit 9f8a1b1

Browse files
committed
Recommended limits for for mongod
1 parent 2db0da9 commit 9f8a1b1

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

files/mongodb.service

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,24 @@ Documentation=man:mongod(1)
55
[Service]
66
User=mongodb
77
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
8-
LimitNOFILE=65535
9-
LimitNPROC=65535
8+
# file size
9+
LimitFSIZE=infinity
10+
# cpu time
11+
LimitCPU=infinity
12+
# virtual memory size
13+
LimitAS=infinity
14+
# open files
15+
LimitNOFILE=64000
16+
# processes/threads
17+
LimitNPROC=64000
18+
# locked memory
19+
LimitMEMLOCK=infinity
20+
# total threads (user+kernel)
21+
TasksMax=infinity
22+
TasksAccounting=false
23+
24+
# Recommended limits for for mongod as specified in
25+
# http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
1026

1127
[Install]
1228
WantedBy=multi-user.target

0 commit comments

Comments
 (0)