Comment 6 for bug 1934849

Revision history for this message
Nobuto Murata (nobuto) wrote :

Okay, as the utils.chunkreadable loop is taking time I've tried a larger WRITE_CHUNKSIZE by hand. It can decrease the amount of time of uploading a 512MB image from 14 minutes to 60 seconds.

$ git diff
diff --git a/glance_store/_drivers/s3.py b/glance_store/_drivers/s3.py
index 1c18531..576c573 100644
--- a/glance_store/_drivers/s3.py
+++ b/glance_store/_drivers/s3.py
@@ -361,7 +361,7 @@ class Store(glance_store.driver.Store):
     EXAMPLE_URL = "s3://<ACCESS_KEY>:<SECRET_KEY>@<S3_URL>/<BUCKET>/<OBJ>"

     READ_CHUNKSIZE = 64 * units.Ki
- WRITE_CHUNKSIZE = READ_CHUNKSIZE
+ WRITE_CHUNKSIZE = 1024 * units.Ki

     @staticmethod
     def get_schemes():