]> git-server-git.apps.pok.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>
Wed, 30 Jun 2021 18:30:55 +0000 (20:30 +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>
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 88417ba58978d31a4fc12d452d4facc62c54134b..d3ce14ca98aac2fa7db4feeb75843bc66bf202e4 100644 (file)
@@ -542,7 +542,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 8d0e0e3170b91933e1052caa97b0e40e79106ba9..8f10e16db2c4d9306c34fa67c2a998321b9aab9c 100644 (file)
@@ -542,7 +542,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 3350527eea2fa8c951f8ed38f7d43599012ebef0..8c25c5dcce9386b5bd3b986ac4c320b9106ebc4e 100644 (file)
@@ -534,7 +534,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 32bc8c16be390ad8fdcaa4d935a4227605dfdef9..741294dc45273bca56221ba1728fdedf6f25ae42 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 e748e4c5f8d90a8d4304b50b3478fce598182971..8b09cfb03b7af40db445d8b3aea92096155c87e5 100644 (file)
@@ -68,6 +68,8 @@
 
     - import_role:
         name: ceph-facts
+    - import_role:
+        name: ceph-handler
     - import_role:
         name: ceph-validate
     - import_role: