Skip to content

Storage: Fix storage parallel operations copying objects - #8483

Closed
HemangChothani wants to merge 3 commits into
googleapis:masterfrom
HemangChothani:feature/storage_parallel_operations_copying_objects
Closed

HemangChothani wants to merge 3 commits into
googleapis:masterfrom
HemangChothani:feature/storage_parallel_operations_copying_objects

Conversation

@HemangChothani

Copy link
Copy Markdown
Contributor

Fixes: #4684

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 27, 2019
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2019
@mf2199

mf2199 commented Aug 2, 2019

Copy link
Copy Markdown
Contributor

@tseaver @crwilcox @frankyn A friendly reminder: This PR has been hanging out for awhile. We could use some feedback regarding its status.

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HemangChothani.

Added a few requests.

One additional nit, in #4684, @houglum mentioned that gsutil uses separate processes with multiple threads to perform the parallel upload.
It'd be ideal to follow along with gsutil's implementation given they both use Python.
Defaults used for processes and threads is defined here: https://github.com/GoogleCloudPlatform/gsutil/blob/0f20832f15adb83047c3c8e74291de7c7d4744e8/gslib/commands/config.py#L362-L367

Additionally, could you perform a time benchmark on using this new method versus gsutil? It doesn't have to be elaborate but to give us a ballpark of how this helper method performs compared to gsutil -m cp.


_DEFAULT_CHUNKSIZE = 104857600 # 1024 * 1024 B * 100 = 100 MB
_MAX_MULTIPART_SIZE = 8388608 # 8 MB
_MAX_THREAD_LIMIT = 10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this number determined?

client,
predefined_acl,
)
time.sleep(0.3)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add more information for using time.sleep(0.3)?

filepath_list.append(os.path.join(directory, filename))
return filepath_list

def upload_parallel(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To follow along with Client.list_blobs(), upload_parallel should be added to Client instead. The current design is a bit confusing as a method under the Blob class given it's used to upload multiple blobs.

@frankyn

frankyn commented Aug 12, 2019

Copy link
Copy Markdown
Contributor

@HemangChothani, I'm closing this issue after internal discussions. This a feature request and it's not within scope of what should be worked on at this time. We have a priority on fixing reliability bugs in our clients before feature requests.

Additionally, this feature in particular requires a design review that has not yet been prioritized.
Thank you for your patience. I'll update the associated bug.

@frankyn frankyn closed this Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support parallel operations for copying objects

6 participants