Speed up volume creation with Image-Volume cache
You can enable Image-Volume cache in the Block Storage service (cinder) to improve the speed of volume creation from frequently-used images.
Before you begin Copy linkLink copied!
- You have configured the internal Block Storage service project,
cinder-internal. For more information, see Create the Block Storage internal project.
About this task Copy linkLink copied!
When you enable Image-Volume cache, the first time you create a volume from an image, a copy of the image volume is cached in the internal Block Storage project, cinder-internal. Subsequent requests to create volumes from the image clone the cached copy instead of downloading the original image contents and copying data to the volume.
You can configure Image-Volume cache per back end. If you are using a third-party back end, refer to the storage vendor’s documentation for information about Image-Volume cache support.
You can set the limit of the Image-Volume cache to a size in GB, number of images, or both.
Procedure Copy linkLink copied!
Volume-from-image optimization Copy linkLink copied!
When you use the Block Storage service (cinder) as a back end for the Image service (glance), volume creation from images can be optimized with back-end-assisted cloning instead of image downloads.
When you create a bootable volume from an image that is stored as an image-volume in the Block Storage back end, the volume creation process clones the image-volume at the storage back-end level. This back-end-assisted cloning is significantly faster than the traditional method of downloading the image data from the Image service and copying it to the new volume.
In a Red Hat OpenStack Services on OpenShift (RHOSO) environment, the Block Storage service is configured with the allowed_direct_url_schemes parameter set to cinder by default. This configuration enables the service to detect when an image is stored as a Block Storage volume and use back-end-assisted cloning for bootable volume creation.
You can also enable upload-to-image optimization to improve the performance of uploading volumes to the Image service.
- Requirements
-
- The image must use the
rawformat andbarecontainer format. - You must create the volume in the same project as the image.
- The image volume and the destination volume must be on the same storage pool. The Block Storage service matches volumes based on the
backend#poolidentifier. For example, both volumes must be oncinder-volume-host@backend#pool_name. - The storage back end must support efficient volume cloning. Most back ends support this optimization, including NetApp ONTAP, Dell PowerFlex, and other back ends with clone capabilities.
- For environments where the Image service creates multiple volumes simultaneously, use a multiattach-enabled volume type for best results.
- The image must use the
- Limitations
-
- In distributed environments with multiple pools, the system can only clone images efficiently to volumes in the same pool. Volumes created in different pools use the traditional download method for the first volume creation, but can benefit from the image-volume cache feature for subsequent creations.
Optimize volume uploads to the Image service Copy linkLink copied!
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).
Before you begin Copy linkLink copied!
- You have configured the Block Storage service (cinder) as a back end for the Image service (glance). For more information, see Configure Block Storage as an Image service back end.
- You have configured the internal Block Storage service project,
cinder-internal. For more information, see Create the Block Storage internal project.
About this task Copy linkLink copied!
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.