]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mds: Increase cpu limit to 4
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 23 Apr 2019 19:54:38 +0000 (15:54 -0400)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Wed, 24 Apr 2019 21:44:23 +0000 (21:44 +0000)
In containerized deployment the default mds cpu quota is too low
for production environment.
This is causing performance degradation compared to bare-metal.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1695850
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 1999cf3d1902456aa123ed3c96116c21e88799bb)

group_vars/mdss.yml.sample
roles/ceph-mds/defaults/main.yml
roles/ceph-mds/templates/ceph-mds.service.j2

index cf0aed5909793e4496b996b0ecdf163c8081cf8b..2412ea730941251631d3e4cc4336465f3ad9bb31 100644 (file)
@@ -28,7 +28,7 @@ dummy:
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
 # These options can be passed using the 'ceph_mds_docker_extra_env' variable.
 #ceph_mds_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-#ceph_mds_docker_cpu_limit: 1
+#ceph_mds_docker_cpu_limit: 4
 
 # we currently for MDS_NAME to hostname because of a bug in ceph-docker
 # fix here: https://github.com/ceph/ceph-docker/pull/770
index ffdb1fe5c460bdc0a1dbc306165ee998486d11c3..0b443ea9a4f703459bde021e3eb118a68b19225a 100644 (file)
@@ -20,7 +20,7 @@ copy_admin_key: false
 # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
 # These options can be passed using the 'ceph_mds_docker_extra_env' variable.
 ceph_mds_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-ceph_mds_docker_cpu_limit: 1
+ceph_mds_docker_cpu_limit: 4
 
 # we currently for MDS_NAME to hostname because of a bug in ceph-docker
 # fix here: https://github.com/ceph/ceph-docker/pull/770
index 9e3dcfb5bf0c4bd018fbe92146abaf458ad570c4..281a7b020ddb257dc6b03d0968bc64723ad02360 100644 (file)
@@ -1,6 +1,7 @@
 [Unit]
 Description=Ceph MDS
 After=docker.service
+{% set cpu_limit = ansible_processor_vcpus|int if ceph_mds_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_mds_docker_cpu_limit|int %}
 
 [Service]
 EnvironmentFile=-/etc/environment
@@ -9,9 +10,9 @@ ExecStartPre=-/usr/bin/docker rm ceph-mds-{{ ansible_hostname }}
 ExecStart=/usr/bin/docker run --rm --net=host \
   --memory={{ ceph_mds_docker_memory_limit }} \
   {% if ceph_docker_version.split('.')[0] is version_compare('13', '>=') -%}
-  --cpus={{ ceph_mds_docker_cpu_limit }} \
+  --cpus={{ cpu_limit }} \
   {% else -%}
-  --cpu-quota={{ ceph_mds_docker_cpu_limit * 100000 }} \
+  --cpu-quota={{ cpu_limit * 100000 }} \
   {% endif -%}
   {% if not containerized_deployment_with_kv -%}
   -v /var/lib/ceph:/var/lib/ceph:z \