0

I have created mongodb database server in linode dedicated host and while tuning the database server for optimal permormence i could not increase the value of ulimit -n I have asked chat GPT, and search alot of forum and google for help no none of them work for me.

Also i want to know what else i have to do to optimize the permormence of my server (one main server and one replica set are configured each having 2 core cpu 20 GB Storage and 24 GB RAM)

i haved tried following configuration:

file name: /etc/security/limits.conf

* soft nofile 64000
* hard nofile 64000

file name:/etc/sysctl.conf

fs.file-max = 64000

file name: /etc/systemd/system.conf

DefaultLimitNOFILE=64000

and restart my server still i got the following output

root@host:# sysctl fs.file-max
fs.file-max = 64000
root@host:# cat /etc/security/limits.conf
* soft nofile 64000
* hard nofile 64000
root@host:# ulimit -n
1024

the only command works is ulimit -n 64000 but once i logout and login again the ulimit reset back to 1024.

Sunil Sapkota
  • 918
  • 2
  • 11
  • 24

0 Answers0