# 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
# 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
{% 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
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 \