swift glance_store not using modern swiftclient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
New
|
Undecided
|
Unassigned |
Bug Description
The original code of the `add`[1] method (upload) is inefficient and takes more time to upload images.
It's significantly improving after using the `python-
Additionally `add` method became simpler.
# The original implementation
> time glance image-create --protected=False --name=
[======
+------
| Property | Value |
+------
| checksum | aa7399679400faa
| container_format | bare |
| created_at | 2021-03-
| direct_url | swift+https:/
| | 69cda31132/
| | c9129366a0e |
| disk_format | vmdk |
| id | 7d0607a8-
| min_disk | 0 |
| min_ram | 0 |
| name | some-large-image |
| os_hash_algo | sha512 |
| os_hash_value | e9d5babf23f2464
| | f07f0ed5e36d422
| os_hidden | False |
| owner | e9141fb24eee4b3
| protected | False |
| size | 7980414976 |
| status | active |
| tags | [] |
| updated_at | 2021-03-
| virtual_size | 64424509440 |
| visibility | private |
+------
real 4m9.821s
user 0m18.227s
sys 0m15.272s
# The improved version using `SwiftService` from `python-
> time glance image-create --protected=False --name=
[======
+------
| Property | Value |
+------
| checksum | 818971a4539213d
| container_format | bare |
| created_at | 2021-03-
| direct_url | swift+https:/
| | 69cda31132/
| | 7c0118f4a02 |
| disk_format | vmdk |
| id | b6f49875-
| min_disk | 0 |
| min_ram | 0 |
| name | some-large-image |
| os_hash_algo | sha512 |
| os_hash_value | 7fa67ff22a1bc18
| os_hidden | False |
| owner | e9141fb24eee4b3
| protected | False |
| size | 0 |
| status | active |
| tags | [] |
| updated_at | 2021-03-
| virtual_size | 64424509440 |
| visibility | private |
+------
real 2m48.374s
user 0m19.205s
sys 0m16.002s
Release: Victoria
glance-21.0.0
glance_store-2.3.0
summary: |
- The upload of image is slow + swift glance_store not using modern swiftclient |
There is an even better result without using `swiftclient`, just using ThreadPoolExecutor I've got such results:
real 2m29.227s
user 0m18.923s
sys 0m17.172s