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():
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 store/_ drivers/ s3.py b/glance_ store/_ drivers/ s3.py store/_ drivers/ s3.py store/_ drivers/ s3.py store.driver. Store): ACCESS_ KEY>:<SECRET_ KEY>@<S3_ URL>/<BUCKET> /<OBJ>"
diff --git a/glance_
index 1c18531..576c573 100644
--- a/glance_
+++ b/glance_
@@ -361,7 +361,7 @@ class Store(glance_
EXAMPLE_URL = "s3://<
READ_CHUNKSIZE = 64 * units.Ki
- WRITE_CHUNKSIZE = READ_CHUNKSIZE
+ WRITE_CHUNKSIZE = 1024 * units.Ki
@staticmethod
def get_schemes():