You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The file upload function FilesAPI.upload_bytes is very slow. Currently uploading 10 files concurrently, but upload speed no more than 4 MB/s (my internet-connection supports 10 MB/s).
The function FilesAPI.upload is however quite fast.
Describe the solution you'd like
The library should be able to parallelize file upload similar to the blob-client in the Azure SDK.
Describe alternatives you've considered
Attempted to parallelize using the Multiprocessing-library:
frommultiprocessingimportPoolNUM_WORKERS=10# {.... }deffile_upload_cb(file_name):
globalcdf_clientwithopen(file_name, 'rb') asf:
cdf_client.files.upload_bytes(f, external_id=fname) # Use file-name as external ID for demo-purposewithPool(NUM_WORKERS) aspool:
pool.map(file_upload_cb, list_of_files)
Additional context
In the picture below, the blue line is the download speed from Azure Blob-storage, the red line is the total upload-speed for 10 concurrent file-uploads using the Cognite FileApi.
The text was updated successfully, but these errors were encountered:
Seems that it is the function FilesAPI.upload_bytes which is slow. The function FilesAPI.upload is sufficiently fast. I have updated the issue to reflect this
thomafred
changed the title
File upload very slowFilesAPI.upload_bytes very slow
Sep 3, 2020
Is your feature request related to a problem? Please describe.
The file upload function
FilesAPI.upload_bytes
is very slow. Currently uploading 10 files concurrently, but upload speed no more than 4 MB/s (my internet-connection supports 10 MB/s).The function
FilesAPI.upload
is however quite fast.Describe the solution you'd like
The library should be able to parallelize file upload similar to the blob-client in the Azure SDK.
Describe alternatives you've considered
Attempted to parallelize using the
Multiprocessing
-library:Additional context
In the picture below, the blue line is the download speed from Azure Blob-storage, the red line is the total upload-speed for 10 concurrent file-uploads using the Cognite FileApi.
The text was updated successfully, but these errors were encountered: