Merge pull request #151 from NeowayLabs/limits
Recommended limits for for mongod
This commit is contained in:
commit
9219f68648
|
@ -101,7 +101,7 @@ mongodb_replication_oplogsize: 1024 # specifies a maximum size in
|
|||
mongodb_set_parameters: { "enableLocalhostAuthBypass": "true", "authenticationMechanisms": "SCRAM-SHA-1,MONGODB-CR" }
|
||||
|
||||
# MMS Agent
|
||||
mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb
|
||||
mongodb_mms_agent_pkg: https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_7.2.0.488-1_amd64.ubuntu1604.deb
|
||||
mongodb_mms_group_id: ""
|
||||
mongodb_mms_api_key: ""
|
||||
mongodb_mms_base_url: https://mms.mongodb.com
|
||||
|
|
|
@ -70,7 +70,7 @@ mongodb_replication_replindexprefetch: "all" # specify index prefetching be
|
|||
mongodb_replication_oplogsize: 1024 # specifies a maximum size in megabytes for the replication operation log
|
||||
|
||||
# MMS Agent
|
||||
mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb
|
||||
mongodb_mms_agent_pkg: https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_7.2.0.488-1_amd64.ubuntu1604.deb
|
||||
mongodb_mms_group_id: ""
|
||||
mongodb_mms_api_key: ""
|
||||
mongodb_mms_base_url: https://mms.mongodb.com
|
||||
|
|
|
@ -4,9 +4,25 @@ Documentation=man:mongod(1)
|
|||
|
||||
[Service]
|
||||
User=mongodb
|
||||
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
|
||||
LimitNOFILE=65535
|
||||
LimitNPROC=65535
|
||||
ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf
|
||||
# file size
|
||||
LimitFSIZE=infinity
|
||||
# cpu time
|
||||
LimitCPU=infinity
|
||||
# virtual memory size
|
||||
LimitAS=infinity
|
||||
# open files
|
||||
LimitNOFILE=64000
|
||||
# processes/threads
|
||||
LimitNPROC=64000
|
||||
# locked memory
|
||||
LimitMEMLOCK=infinity
|
||||
# total threads (user+kernel)
|
||||
TasksMax=infinity
|
||||
TasksAccounting=false
|
||||
|
||||
# Recommended limits for for mongod as specified in
|
||||
# http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
service: name={{ mongodb_daemon_name }} state=restarted
|
||||
when: mongodb_manage_service
|
||||
|
||||
- name: mongodb-mms-automation-agent restart
|
||||
service: name=mongodb-mms-automation-agent state=restarted
|
||||
- name: mongodb-mms-monitoring-agent restart
|
||||
service: name=mongodb-mms-monitoring-agent state=restarted
|
||||
when: mongodb_manage_service
|
||||
|
||||
- name: reload systemd
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
|
||||
- name: Create log if missing
|
||||
file: state=touch dest={{ mongodb_systemlog_path }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
||||
when: ( logfile_stat is defined
|
||||
and not logfile_stat.stat.exists
|
||||
and mongodb_systemlog_destination == "file" )
|
||||
when: ( mongodb_systemlog_destination == "file"
|
||||
and logfile_stat is defined
|
||||
and not logfile_stat.stat.exists )
|
||||
|
||||
- name: Ensure dbpath directory
|
||||
file:
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
file: state=directory path=/etc/mongodb-mms owner={{mongodb_user}} group={{mongodb_user}} mode=0755
|
||||
|
||||
- name: Configure the MMS agent pt. 2
|
||||
template: src=automation-agent.config.j2 dest=/etc/mongodb-mms/automation-agent.config
|
||||
notify: mongodb-mms-automation-agent restart
|
||||
template: src=monitoring-agent.config.j2 dest=/etc/mongodb-mms/monitoring-agent.config
|
||||
notify: mongodb-mms-monitoring-agent restart
|
||||
|
||||
- name: Ensure that the MMS agent is started
|
||||
service: name=mongodb-mms-automation-agent state=started enabled=yes
|
||||
service: name=mongodb-mms-monitoring-agent state=started enabled=yes
|
||||
when: mongodb_manage_service
|
||||
|
|
Loading…
Reference in New Issue