1/ The OSD already supports cpuset to be used for containerized deployments
through the use of the ceph_osd_docker_cpuset_cpus variable. This adds similar
support to the RGW service for containerized deployments by setting a new
variable named ceph_rgw_docker_cpuset_cpus. Like the OSD, there are times where
using distinct cores has advantages over using the CFS in kernel scheduler.
ceph_rgw_docker_cpuset_cpus accepts a comma delimited set of CPU ids
2/ Add support for specifying --cpuset-mem variable to restrict the cgroup's memory
allocations to a particular numa node, which should typically correspond with
the cpu ids of that numa node that were provided with --cpuset-cpus. To ensure
the correct cpu ids are used one can run `numactl --hardware` to list the nodes
and which cpu ids correspond to each.
Signed-off-by: Kyle Bader <kbader@redhat.com>
Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit
0bee90b20195f0764c3d9001fb06d0999b5fc6cf)
# 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: 8
+#ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16"
+#ceph_rgw_docker_cpuset_mems: "0"
#ceph_rgw_docker_extra_env:
#ceph_config_keys: [] # DON'T TOUCH ME
# 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: 8
+#ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16"
+#ceph_rgw_docker_cpuset_mems: "0"
ceph_rgw_docker_extra_env:
ceph_config_keys: [] # DON'T TOUCH ME
{% else -%}
--cpu-quota={{ cpu_limit * 100000 }} \
{% endif -%}
+ {% if ceph_rgw_docker_cpuset_cpus is defined -%}
+ --cpuset-cpus="{{ ceph_rgw_docker_cpuset_cpus }}" \
+ {% endif -%}
+ {% if ceph_rgw_docker_cpuset_mems is defined -%}
+ --cpuset-mems="{{ ceph_rgw_docker_cpuset_mems }}" \
+ {% endif -%}
-v /var/lib/ceph:/var/lib/ceph:z \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \