]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: Increase cpu limit to 4
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 5 Apr 2019 13:45:28 +0000 (09:45 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 24 Apr 2019 15:59:42 +0000 (17:59 +0200)
In containerized deployment the default osd cpu quota is too low
for production environment using NVMe devices.
This is causing performance degradation compared to bare-metal.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1695880
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
group_vars/osds.yml.sample
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/templates/ceph-osd-run.sh.j2

index 138f96c91a788b4ff3e8cb9980aa4d527e2626fa..6c3e114d5b4112001cf1d4709d1b2338f846741b 100644 (file)
@@ -122,7 +122,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_osd_docker_extra_env' variable.
 #ceph_osd_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-#ceph_osd_docker_cpu_limit: 1
+#ceph_osd_docker_cpu_limit: 4
 
 # The next two variables are undefined, and thus, unused by default.
 # If `lscpu | grep NUMA` returned the following:
index 66effee868ae557b6b09cbc4e5c43bb8af1582d1..1f3e8baef04e8e82ba4e9ca40a19d8106cebd751 100644 (file)
@@ -114,7 +114,7 @@ ceph_config_keys: [] # DON'T TOUCH ME
 # 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_osd_docker_extra_env' variable.
 ceph_osd_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-ceph_osd_docker_cpu_limit: 1
+ceph_osd_docker_cpu_limit: 4
 
 # The next two variables are undefined, and thus, unused by default.
 # If `lscpu | grep NUMA` returned the following:
index 02c2d1f7c2f7c5022c1befffdc2cbbeb5879e73f..ba2acf817b77d1751e80a56455c3b19f87dc7c3e 100644 (file)
@@ -5,6 +5,7 @@
 ########
 # MAIN #
 ########
+{% set cpu_limit = ansible_processor_vcpus|int if ceph_osd_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_osd_docker_cpu_limit|int %}
 
 {% if ceph_osd_numactl_opts != "" %}
 numactl \
@@ -20,9 +21,9 @@ numactl \
   --memory={{ ceph_osd_docker_memory_limit }} \
   {% endif -%}
   {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
-  --cpus={{ ceph_osd_docker_cpu_limit }} \
+  --cpus={{ cpu_limit }} \
   {% else -%}
-  --cpu-quota={{ ceph_osd_docker_cpu_limit * 100000 }} \
+  --cpu-quota={{ cpu_limit * 100000 }} \
   {% endif -%}
   {% if ceph_osd_docker_cpuset_cpus is defined -%}
   --cpuset-cpus='{{ ceph_osd_docker_cpuset_cpus }}' \