GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — slow download · Issue #2927 · googleapis/google-cloud-python

slow download #2927

New issue
Copy link
New issue
Copy link
Closed
Closed
slow download#2927
Copy link
Assignees
tseaver
Labels
api: storageIssues related to the Cloud Storage API.performancepriority: p2Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.type: questionRequest for information or clarification. Not an issue.

Description

@pdudnik
pdudnik
opened on Jan 9, 2017
Issue body actions

I am trying to download a 400M gcs file. I am using https://github.com/GoogleCloudPlatform/google-cloud-python/blob/ce6756fbe3633c74fd742567654565147628f4ba/storage/google/cloud/storage/blob.py. I noticed that by default my download looks to be chunked due to this setting here

https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/core/google/cloud/streaming/transfer.py#L46

As a result downloading the file results in 400 calls to GCS which significantly slows down the download.

Is there some clean way I can override that when using blob.download_to_file?

Reacted by protoforge

Activity

  1. daspecster
    added
    api: storageIssues related to the Cloud Storage API.
    on Jan 10, 2017
  2. dhermes commented on Jan 12, 2017

    @dhermes
    dhermes
    on Jan 12, 2017
    Contributor
    More actions

    Thanks for reporting. This is actually deeper than it seems. The "correct" fix is for us to remove the (non-public) google.streaming stuff that this relies on and get a better chunking story (that doesn't rely on httplib2).

    For a fix that works right now, you can duplicate the source but pass chunksize to Download. Also, gsutil (the CLI tool) has a very optimized strategy for fast downloads.

  3. danoscarmike
    added
    Status: Acknowledged
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: questionRequest for information or clarification. Not an issue.
    on Feb 28, 2017
  4. bjwatson
    added
    status: blockedResolving the issue is dependent on other work.
    on Feb 28, 2017
  5. bjwatson commented on Feb 28, 2017

    @bjwatson
    bjwatson
    on Feb 28, 2017
    More actions

    @lukesneeringer says this is blocked on httplib2 work.

  6. lukesneeringer commented on Mar 17, 2017

    @lukesneeringer
    lukesneeringer
    on Mar 17, 2017
    Contributor
    More actions

    The correct solution is blocked on #1998.

    What would be the benefits and drawbacks of increasing the default in the meantime, though? Would it be okay to make the default chunk size 10 MB instead of 1 MB?

    Alternatively, could we find out the size of the file in advance and make the chunk size into some reasonable fragment (say, 2% or 5% of file size, with a 1 MB lower limit)?

  7. pdudnik commented on Mar 17, 2017

    @pdudnik
    pdudnik
    on Mar 17, 2017 via email
    Author
    More actions
    I think gcs has a way of Auto detecting what's the best chunk size, so I'd ask them. I know they have solutions for this issue
    …
    On Mar 17, 2017 11:30, "Luke Sneeringer" ***@***.***> wrote: The *correct* solution is blocked on #1998 <#1998>. What would be the benefits and drawbacks of increasing the default, though? Would it be okay to make the default chunk size 10 MB instead of 1 MB? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#2927 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AD3X0_ilSzH8HsAgfP3ZdUhkG0L6g76xks5rmtE5gaJpZM4Lez3I> .
  8. evanj commented on Jun 3, 2017

    @evanj
    evanj
    on Jun 3, 2017
    Contributor
    More actions

    I think this is basically a duplicate of #2222

  9. tseaver
    added
    performance
    on Jun 5, 2017
  10. lukesneeringer commented on Aug 10, 2017

    @lukesneeringer
    lukesneeringer
    on Aug 10, 2017
    Contributor
    More actions

    @dhermes Is this easier now that #1998 is done?

  11. dhermes commented on Aug 10, 2017

    @dhermes
    dhermes
    on Aug 10, 2017
    Contributor
    More actions

    Not easier or harder. AFAIK there is no perfect magic chunking answer, @thobrla has said before that downloading in a single request (vs. chunks) is almost always the right answer

  12. lukesneeringer
    removed
    status: acknowledged
    on Nov 8, 2017
  13. tseaver commented on Jan 8, 2018

    @tseaver
    tseaver
    on Jan 8, 2018
    Contributor
    More actions

    Duplicate: #2222.

  14. tseaver
    closed this as completedon Jan 8, 2018
  15. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: storageIssues related to the Cloud Storage API.performancepriority: p2Moderately-important priority. Fix may not be included in next release.status: blockedResolving the issue is dependent on other work.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.