3.8. Configuring upload-to-image optimization
You can enable upload-to-image optimization in the Block Storage service (cinder) to improve the performance of uploading volumes to the Image service (glance).
When you enable this optimization, the upload-to-image operation creates a cloned volume and registers its location with the Image service instead of transferring data. This significantly improves performance for upload operations.
Prerequisites
- You have configured the Block Storage service (cinder) as a back end for the Image service (glance). For more information, see Configuring Block Storage as an Image service back end.
-
You have configured the internal Block Storage service project,
cinder-internal. For more information, see 第 3.5 节 “Creating an internal project for the Block Storage service”.
Procedure
Open your
OpenStackControlPlaneCR file,openstack_control_plane.yaml, and add theimage_upload_use_cinder_backendparameter to the Block Storage back-end configuration. In this example, the Image service uses the Block Storage service as a back end, and the Block Storage service uses Red Hat Ceph Storage as a back end:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: cinder: template: cinderVolumes: ceph: customServiceConfig: | [DEFAULT] cinder_internal_tenant_project_id = <project_id> cinder_internal_tenant_user_id = <user_id> [ceph] image_upload_use_cinder_backend = True image_upload_use_internal_tenant = True ...-
Replace
<project_id>with the ID of yourcinder-internalproject. -
Replace
<user_id>with the ID of yourcinder-internalproject user. -
Set
image_upload_use_cinder_backendtoTrueto enable the optimization. -
Set
image_upload_use_internal_tenanttoTrueto store image-volumes in thecinder-internalproject instead of the user’s project.
-
Replace
Update the control plane:
$ oc apply -f openstack_control_plane.yaml -n openstackWait until RHOCP creates the resources related to the
OpenStackControlPlaneCR. Run the following command to check the status:$ oc get openstackcontrolplane -n openstackThe
OpenStackControlPlaneresources are created when the status is "Setup complete".提示Append the
-woption to the end of thegetcommand to track deployment progress.
Additional resources