]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
radosgw: Raise cpu limit to 8
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 2 Apr 2019 14:39:42 +0000 (10:39 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 4 Apr 2019 16:50:48 +0000 (18:50 +0200)
In containerized deployment the default radosgw 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=1680171
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
group_vars/rgws.yml.sample
roles/ceph-rgw/defaults/main.yml
roles/ceph-rgw/templates/ceph-radosgw.service.j2

index 78e69513fb44d6f69d00b07d0015560587397977..1200c0593c3f88c87b732bffb263f4c974810d64 100644 (file)
@@ -58,7 +58,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_rgw_docker_extra_env' variable.
 #ceph_rgw_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-#ceph_rgw_docker_cpu_limit: 1
+#ceph_rgw_docker_cpu_limit: 8
 
 #ceph_rgw_docker_extra_env:
 #ceph_config_keys: [] # DON'T TOUCH ME
index 6ab3946a512fd4c2feb61ec19aaf7631606d8761..f77c1f6ab8159ac1b0142205065002056cac4d65 100644 (file)
@@ -50,7 +50,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_rgw_docker_extra_env' variable.
 ceph_rgw_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
-ceph_rgw_docker_cpu_limit: 1
+ceph_rgw_docker_cpu_limit: 8
 
 ceph_rgw_docker_extra_env:
 ceph_config_keys: [] # DON'T TOUCH ME
index d25cf3e6bcaa10315e92f1f4bc81638e888131b5..4368da9d20463fc0ead4b7954574f7aaf5b07c73 100644 (file)
@@ -3,6 +3,7 @@ Description=Ceph RGW
 {% if container_binary == 'docker' %}
 After=docker.service
 {% endif %}
+{% set cpu_limit = ansible_processor_vcpus|int if ceph_rgw_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_rgw_docker_cpu_limit|int %}
 
 [Service]
 EnvironmentFile=/var/lib/ceph/radosgw/ceph-%i/EnvironmentFile
@@ -11,9 +12,9 @@ ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   --memory={{ ceph_rgw_docker_memory_limit }} \
   {% if (container_binary == 'docker' and ceph_docker_version.split('.')[0] is version_compare('13', '>=')) or container_binary == 'podman' -%}
-  --cpus={{ ceph_rgw_docker_cpu_limit }} \
+  --cpus={{ cpu_limit }} \
   {% else -%}
-  --cpu-quota={{ ceph_rgw_docker_cpu_limit * 100000 }} \
+  --cpu-quota={{ cpu_limit * 100000 }} \
   {% endif -%}
   -v /var/lib/ceph:/var/lib/ceph:z \
   -v /etc/ceph:/etc/ceph:z \