[SRU] Image fetch speed from Glance to Cinder volume service can be slow and capped by client CPU
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Glance Client |
Fix Committed
|
Undecided
|
Unassigned | ||
| Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
| Bobcat |
Fix Released
|
Undecided
|
Unassigned | ||
| Caracal |
Fix Released
|
Undecided
|
Unassigned | ||
| Yoga |
Fix Released
|
Undecided
|
Rodrigo Barbieri | ||
| python-glanceclient (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
| Jammy |
Fix Released
|
Undecided
|
Rodrigo Barbieri | ||
| Noble |
Fix Released
|
Undecided
|
Unassigned | ||
| python-openstacksdk (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
| Jammy |
Fix Released
|
Undecided
|
Rodrigo Barbieri | ||
| Noble |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
*********** SRU TEMPLATE AT THE BOTTOM **************
When Cinder volume service creates a volume from an image, it will download an image from Glance to a cinder-volume unit (to be precise, when CoW is not available by the backend between Glance and Cinder).
The image fetch speed is not super fast as of today:
2023-05-17 02:52:28.275 158391 DEBUG cinder.
2023-05-17 02:52:28.275 158391 INFO cinder.
-> ~ 549 Mbps
By running a profiler, it looks like serious_
Image caching can overcome this kind of challenges but this report is for when we need to download images (new images, updated images, etc.).
https:/
===============
SRU DESCRIPTION
===============
[Impact]
This issue causes images to be download much slower than they should, causing VM creation to potentially time out if the image is too big and takes too long. The fix proposed greatly improves performance and prevents timeouts in most cases where it would timeout without the fix.
[Test case]
Steps for python-
-------
1. Deploy OpenStack with Cinder and Glance
2. Upload a resonable large image, like jammy ~650mb is enough.
3. Create a volume from the image
openstack volume create --size 3 --image jammy v1
4. Check the logs for messages of time to fetch/download the image:
... cinder.
... cinder.
5. Repeat steps (3) and (4) 3 times just to make sure it is consistent and to have an average (avoid underlying infra fluctuations)
6. Install fix and restart all cinder services (such as apache2, cinder-scheduler and cinder-volume)
7. Repeat steps (3), (4) and (5), and make sure the new duration and download rate is at least about 50% faster.
Steps for python-
-------
1. Deploy OpenStack with Glance
2. Upload a resonable large image, like jammy ~650mb is enough.
3. Install python3-
sudo apt install python3-
4. Download the image (repeat about 5 times to have an average)
time openstack image save jammy --file /dev/null
5. Install fixed package (python3-
6. Download the image again (repeat about 5 times to have an average). This time there should be a significant decrease in time
[Where problems could occur]
If there are issues with the fix, it could impact the ability to download images at all, therefore impacting the ability to create volumes from images, and create VMs. Reverting the package is enough to undo the changes and restore previous functionality.
[Other Info]
Both python-glanceclient and openstacksdk fixes listed below are necessary.
https:/
https:/
| description: | updated |
| summary: |
- Image fetch speed from Glance to Cinder volume service can be slow and - capped by client CPU + [SRU] Image fetch speed from Glance to Cinder volume service can be slow + and capped by client CPU |
| Changed in cloud-archive: | |
| status: | New → Fix Released |
| Changed in python-glanceclient (Ubuntu): | |
| status: | New → Fix Released |
| Changed in python-openstacksdk (Ubuntu): | |
| status: | New → Fix Released |
| Changed in python-glanceclient (Ubuntu Jammy): | |
| assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
| status: | New → In Progress |
| Changed in python-glanceclient (Ubuntu Noble): | |
| status: | New → Fix Released |
| Changed in python-openstacksdk (Ubuntu Noble): | |
| status: | New → Fix Released |
| Changed in python-openstacksdk (Ubuntu Jammy): | |
| assignee: | nobody → Rodrigo Barbieri (rodrigo-barbieri2010) |
| status: | New → In Progress |
| description: | updated |
| description: | updated |
| tags: |
added: verification-done removed: verification-needed |

By changing the CHUNKSIZE from 64 KiB to 1 MiB, it looks like the CPU was used more efficiently and it does the trick.
2023-05-17 11:54:23.080 376143 DEBUG cinder. image.image_ utils [req-8228848b- f037-4a6a- 802e-de7ffe62ba e6 a32b8e6ed20f484 eba8ddae8f7b6eb 1e 08dd29cd8676470 c8e0b73d2667f8c f0 - - -] Image fetch details: cinder/ conversion/ image_fetch_ 741953c3- 08f7-43b6- b423-2be938ac8d 02_gnmu2b9ycind er@cinder- ceph, size 1907.35 MB, duration 14.44 sec fetch /usr/lib/ python3/ dist-packages/ cinder/ image/i image.image_ utils [req-8228848b- f037-4a6a- 802e-de7ffe62ba e6 a32b8e6ed20f484 eba8ddae8f7b6eb 1e 08dd29cd8676470 c8e0b73d2667f8c f0 - - -] Image download 1907.3
dest /var/lib/
mage_utils.py:639
2023-05-17 11:54:23.080 376143 INFO cinder.
5 MB at 132.10 MB/s
-> 1,057 Mbps
`openstack image save` with openstacksdk has a similar issue so I reported it separately as: /storyboard. openstack. org/#!/ story/2010759
https:/