From a0c35ec1c814eae5b41da04c766fbbb16359b8a2 Mon Sep 17 00:00:00 2001 From: misook Date: Fri, 22 Nov 2024 19:26:22 +0900 Subject: [PATCH] Improve Cinder volume performance with tmpfs for image conversion This change implements the use of tmpfs for Cinder's image conversion and encryption processes. Key improvements include: - Performs image conversion and encryption in memory using tmpfs (use from root disk to memory of /var/lib/cinder/conversion volume) - Reduces IO load on the cinder Docker volume - Enhances performance for large (virtual size) images - Improves efficiency of image format conversion and encryption This optimization is effective when sufficient memory is available on the cinder-volume host. Closes-Bug: #2089345 Change-Id: Idea788fdf12f0ae51041b368802b7c958952a847 --- cinder/Chart.yaml | 2 +- cinder/templates/deployment-volume.yaml | 8 +++++++- cinder/values.yaml | 2 ++ releasenotes/notes/cinder.yaml | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cinder/Chart.yaml b/cinder/Chart.yaml index fe9bd25d96..f360911980 100644 --- a/cinder/Chart.yaml +++ b/cinder/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Cinder name: cinder -version: 0.3.26 +version: 0.3.27 home: https://docs.openstack.org/cinder/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Cinder/OpenStack_Project_Cinder_vertical.png sources: diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index e2d2fc4d4b..5af6b4cac6 100644 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -302,7 +302,13 @@ spec: - name: pod-shared emptyDir: {} - name: cinder-conversion - emptyDir: {} + emptyDir: + {{- if .Values.conf.enable_conversion_tmpfs }} + medium: Memory + sizeLimit: {{ .Values.conf.conversion_tmpfs_size }} + {{- else }} + {} + {{- end }} {{- if eq "true" (include "cinder.utils.has_ceph_backend" $envAll) }} - name: etcceph emptyDir: {} diff --git a/cinder/values.yaml b/cinder/values.yaml index 29e087253b..37470ac5a9 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -1011,6 +1011,8 @@ conf: - volume_type volume_type: [] enable_iscsi: false + enable_conversion_tmpfs: false + conversion_tmpfs_size: "10Gi" cinder_api_uwsgi: uwsgi: add-header: "Connection: close" diff --git a/releasenotes/notes/cinder.yaml b/releasenotes/notes/cinder.yaml index e1a9592489..68bb41905a 100644 --- a/releasenotes/notes/cinder.yaml +++ b/releasenotes/notes/cinder.yaml @@ -76,4 +76,5 @@ cinder: - 0.3.24 Fix volume type create to allow encrypt volume type - 0.3.25 Add 2024.2 Ubuntu Jammy overrides - 0.3.26 Mount /run/cryptsetup in cinder-volume container + - 0.3.27 Add support for using a tmpfs for cinder image conversion ...