Increase swift upload threads to 10
We previously used swiftclient to upload image objects, and it uses 10 threads to upload SLO segments in parallel. Openstacksdk uses 5 by default. Increase it to 10 to match swiftclient. This should improve our initial upload performance. Change-Id: Idfee3cbbc9d49d9e14ad7d9db3ceafbd8ca526f6
This commit is contained in:
parent
fcb5462c1f
commit
6231841461
@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
@ -33,7 +34,11 @@ SEGMENT_SIZE = 500000000 # 500MB
|
||||
def get_cloud(cloud):
|
||||
if isinstance(cloud, dict):
|
||||
config = openstack.config.loader.OpenStackConfig().get_one(**cloud)
|
||||
return openstack.connection.Connection(config=config)
|
||||
return openstack.connection.Connection(
|
||||
config=config,
|
||||
pool_executor=concurrent.futures.ThreadPoolExecutor(
|
||||
max_workers=10
|
||||
))
|
||||
else:
|
||||
return openstack.connect(cloud=cloud)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user