]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
container: set tcmalloc value by default
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 29 Jun 2021 17:24:29 +0000 (13:24 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 1 Jul 2021 13:46:06 +0000 (15:46 +0200)
All ceph daemons need to have the TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
environment variable set to 128MB by default in container setup.

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

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-common/tasks/configure_memory_allocator.yml
roles/ceph-defaults/defaults/main.yml
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-osd/templates/ceph-osd.service.j2
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
roles/ceph-rgw/templates/ceph-radosgw.service.j2
site.yml.sample

index 169c4717bd74344b4b42bd3b4ac95e98da771c32..b6163885a5455e3ccbaa75f3b871cf56348a68ee 100644 (file)
@@ -544,7 +544,7 @@ dummy:
 # For Debian & Red Hat/CentOS installs set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
 # Set this to a byte value (e.g. 134217728)
 # A value of 0 will leave the package default.
-#ceph_tcmalloc_max_total_thread_cache: 0
+#ceph_tcmalloc_max_total_thread_cache: 134217728
 
 
 ##########
index d615162c94ac8ed7981e136a72eeee2396de99eb..03ba1a357ef0d806c01f0025d02e5487dc277677 100644 (file)
@@ -544,7 +544,7 @@ ceph_iscsi_config_dev: false
 # For Debian & Red Hat/CentOS installs set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
 # Set this to a byte value (e.g. 134217728)
 # A value of 0 will leave the package default.
-#ceph_tcmalloc_max_total_thread_cache: 0
+#ceph_tcmalloc_max_total_thread_cache: 134217728
 
 
 ##########
index 115ecf59ed10e255c58f70aa835cb1b7bc849ddd..2e81b629fb64ed3a919e7f51eb65abf45b255722 100644 (file)
@@ -9,7 +9,13 @@
   when:
     - ansible_facts['os_family'] == 'Debian'
     - etc_default_ceph.stat.exists
-  notify: restart ceph osds
+  notify:
+    - restart ceph mons
+    - restart ceph mgrs
+    - restart ceph osds
+    - restart ceph mdss
+    - restart ceph rgws
+    - restart ceph rbdmirrors
 
 - name: configure TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES for redhat
   lineinfile:
     regexp: "^TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES="
     line: "TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }}"
   when: ansible_facts['os_family'] == 'RedHat'
-  notify: restart ceph osds
+  notify:
+    - restart ceph mons
+    - restart ceph mgrs
+    - restart ceph osds
+    - restart ceph mdss
+    - restart ceph rgws
+    - restart ceph rbdmirrors
index 29566bc7e8887215ff298a5bd051b7287fc65151..e545cdb6941b790e620a94d9ed542798fc7c1abe 100644 (file)
@@ -536,7 +536,7 @@ os_tuning_params:
 # For Debian & Red Hat/CentOS installs set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
 # Set this to a byte value (e.g. 134217728)
 # A value of 0 will leave the package default.
-ceph_tcmalloc_max_total_thread_cache: 0
+ceph_tcmalloc_max_total_thread_cache: 134217728
 
 
 ##########
index be5d000fdff9ebffc5edb890f4a06e1af94f53f2..c681146cbc32caaca19d0df3065f556a6076ac26 100644 (file)
@@ -32,6 +32,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   -e CLUSTER={{ cluster }} \
   -e CEPH_DAEMON=MDS \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   {{ ceph_mds_docker_extra_env }} \
   --name=ceph-mds-{{ ansible_facts['hostname'] }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
index c7f7f42a7f3ea44fbeb7a7154524285af4bfaf1c..56c49c4a6d0bb7226d1b4e4398efac252c96a2aa 100644 (file)
@@ -31,6 +31,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   -e CLUSTER={{ cluster }} \
   -e CEPH_DAEMON=MGR \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   {{ ceph_mgr_docker_extra_env }} \
   --name=ceph-mgr-{{ ansible_facts['hostname'] }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
index cf2e20ccdd848feb043a29dc9cff1466e1f24365..ed95cc60b9d120716c2839ec2b3c4e6987513df4 100644 (file)
@@ -46,6 +46,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
   -e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \
   -e CEPH_DAEMON=MON \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   {{ ceph_mon_docker_extra_env }} \
   {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
 {% if container_binary == 'podman' %}
index 8d06dce34d028ceed209fc4ec01e724dcd065f26..fb179dde503f605e740d85c666a0b1aa5899f731 100644 (file)
@@ -54,9 +54,7 @@ numactl \
   {% endif -%}
   {{ container_env_args }} \
   -e CLUSTER={{ cluster }} \
-  {% if (ceph_tcmalloc_max_total_thread_cache | int) > 0 -%}
   -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
-  {% endif -%}
   -v /run/lvm/:/run/lvm/ \
   -e CEPH_DAEMON=OSD_CEPH_VOLUME_ACTIVATE \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
index f2ad5c186f7d872d9475b45ef5f5b28b1b451001..48c0b3d17bd867a44f17adf7da602a8193391940 100644 (file)
@@ -31,6 +31,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   -e CLUSTER={{ cluster }} \
   -e CEPH_DAEMON=RBD_MIRROR \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   --name=ceph-rbd-mirror-{{ ansible_facts['hostname'] }} \
   {{ ceph_rbd_mirror_docker_extra_env }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
index 9aec3bc5ad65d2dcd4331471988ff735cb5eed34..7c007e5bdf8676b79dc2d28ad4bde8a3cc132c4c 100644 (file)
@@ -45,6 +45,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
   -e CLUSTER={{ cluster }} \
   -e RGW_NAME={{ ansible_facts['hostname'] }}.${INST_NAME} \
   -e CONTAINER_IMAGE={{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \
+  -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \
   --name=ceph-rgw-{{ ansible_facts['hostname'] }}-${INST_NAME} \
   {{ ceph_rgw_docker_extra_env }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
index b4526cace34373a3726dbebade1d08fef40ca7a7..de277303ebb5cec9d9746ec17a816d051e87f9fc 100644 (file)
@@ -69,6 +69,8 @@
 
     - import_role:
         name: ceph-facts
+    - import_role:
+        name: ceph-handler
     - import_role:
         name: ceph-validate
     - import_role: