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 gcloud storage upload for small files? · Issue #1078 · googleapis/google-cloud-node

Slow gcloud storage upload for small files? #1078

New issue
Copy link
New issue
Copy link
Closed
Closed
Slow gcloud storage upload for small files?#1078
Copy link
Assignees
stephenplusplus
Labels
api: storageIssues related to the Cloud Storage API.

Description

@srlowe
srlowe
opened on Jan 20, 2016
Issue body actions

I'm seeing upload times of over 6000ms for small 10kB files. Please could someone confirm if this is expected for Google cloud uploads, or is it more likely there is some client problem happening?

I've tried disabling resumable and validation, and this improves things a bit, but not substantially. Our upload code looks like this:

    var options = {
        resumable : false,
        validation: false
    };

    var remoteWriteStream = bucket.file(fileName).createWriteStream(options);
    remoteWriteStream.on('finish', function(){ callback(); });
    remoteWriteStream.on('error',  function(err){ callback(err); });
    sourceStream.pipe(remoteWriteStream);

Activity

  1. stephenplusplus commented on Jan 20, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 20, 2016
    Contributor
    More actions

    Can you run another upload immediately after the first one completes and measure the time difference?

  2. stephenplusplus
    added
    api: storageIssues related to the Cloud Storage API.
    on Jan 20, 2016
  3. srlowe
    changed the title [-]Extremely slow gcloud storage upload for small files?[/-] [+]Slow gcloud storage upload for small files?[/+] on Jan 20, 2016
  4. srlowe commented on Jan 20, 2016

    @srlowe
    srlowe
    on Jan 20, 2016
    Author
    More actions

    Sure. It seems subsequent calls are faster. Here's the same upload repeated 5x in a row (~10kB with resume and validation off):

    4935ms, 3336ms, 2336ms, 2551ms, 2695ms.

    Still seems on the slow side to me - what do you think?

    Maybe my expectations are wrong though. I suppose there are overheads like auth etc, which disadvantage small files.

  5. jgeewax commented on Jan 20, 2016

    @jgeewax
    jgeewax
    on Jan 20, 2016
    Contributor
    More actions

    This definitely seems wrong to me. Uploading 10k shouldn't be taking 1000
    ms. That said, GCS is optimized for throughput (aka, large file overall
    upload time) rather than latency (small file overall upload time), so it's
    possible (just shitty...)

  6. srlowe commented on Jan 20, 2016

    @srlowe
    srlowe
    on Jan 20, 2016
    Author
    More actions

    @jgeewax - Right, that was my feeling too.

    Does anyone know if there's some kind of debug mode, which might give some visibility into what's happening, time-wise?

  7. stephenplusplus commented on Jan 20, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 20, 2016
    Contributor
    More actions

    With my own tests, I complete uploads consistently under 1s. It went up to around 3 if I uploaded to a bucket overseas. Any chance location could be playing a role?

  8. jgeewax commented on Jan 20, 2016

    @jgeewax
    jgeewax
    on Jan 20, 2016 via email
    Contributor
    More actions
    That's a good point. If you're in the US and your bucket is in Asia (or vice versa), that would explain the extra latency (mainly wire time)
  9. srlowe commented on Jan 20, 2016

    @srlowe
    srlowe
    on Jan 20, 2016
    Author
    More actions

    Thanks, I tried both US and EU storage locations, but times seemed similar (I'm in EU).

  10. jgeewax commented on Jan 20, 2016

    @jgeewax
    jgeewax
    on Jan 20, 2016 via email
    Contributor
    More actions
    @mziccard (who is also in EU and may be able to help us with some debugging :P) Can you do a traceroute to be sure that your upload request is actually being routed to endpoints in the EU?
  11. stephenplusplus commented on Jan 20, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 20, 2016
    Contributor
    More actions

    If you have gsutil CLI tool installed, you can see what times you get there, just to see if there are any huge differences:

    time gsutil cp 10kfile.txt gs://your-bucket
  12. stephenplusplus commented on Jan 20, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 20, 2016
    Contributor
    More actions

    Here's the test I've used: https://gist.github.com/stephenplusplus/15d0d7e96a40887c74aa

  13. srlowe commented on Jan 20, 2016

    @srlowe
    srlowe
    on Jan 20, 2016
    Author
    More actions

    @jgeewax , @stephenplusplus - Thanks, I'll test traceroute, gsutil and that test script and report back.

    Worth noting that I'm doing this from an external machine, not google-compute, and am specifying credentials like so (which may be a factor):

    var storage = gcloud.storage({
        projectId   : xxx,
        credentials : {
              client_email : yyy,
              private_key  : zzz
    });
    
  14. stephenplusplus commented on Jan 26, 2016

    @stephenplusplus
    stephenplusplus
    on Jan 26, 2016
    Contributor
    More actions

    The credentials will cause a delay, but will only affect the first request. Have you had a chance to run any more tests?

    @mziccard any chance you can run the sample here and report your findings? https://gist.github.com/stephenplusplus/15d0d7e96a40887c74aa

  15. stephenplusplus commented on Feb 4, 2016

    @stephenplusplus
    stephenplusplus
    on Feb 4, 2016
    Contributor
    More actions

    @bgSosh I'm going to close this out as this is likely a geographic issue, beyond what this library can help with. If you have a chance to run some more tests or find anything we might not have thought of that would help, please re-open.

  16. stephenplusplus
    closed this as completedon Feb 4, 2016
  17. Eve-rine commented on Nov 9, 2020

    @Eve-rine
    Eve-rine
    on Nov 9, 2020
    More actions

    Hello guys my uploads are taking too long for small files of 500kbs upto 98 seconds how do I sort this issue please

  18. stephenplusplus commented on Nov 9, 2020

    @stephenplusplus
    stephenplusplus
    on Nov 9, 2020
    Contributor
    More actions

    @Evrine19 please open a new issue and follow the issue template. That will help us get up to speed and see if we can reproduce the issue you're having. Thanks!

  19. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  20. sofisl
    added a commit that references this issue on Jan 17, 2023

    chore(deps): update dependency webpack-cli to v5 (#1078)

    dc421e7
  21. miguelvelezsa
    added a commit that references this issue on Jul 23, 2025

    chore: release 2.22.0 (#1078)

    e075044
  22. sofisl
    added 2 commits that reference this issue on Feb 24, 2026

    feat!: Drop Node 8 support (#1006)

    2500a99

    fix: handle potential errors when creating stream (#1208)

    2be06a4
  23. GautamSharda
    added a commit that references this issue on Mar 11, 2026

    feat: Opentelemetry integration (#1078)

    13da2a7
  24. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    samples: Bigtable deletion code samples (#1078)

    2f695e0

    samples: Bigtable deletion code samples (#1078)

    919afa6
  25. feywind
    added a commit that references this issue on Mar 27, 2026

    feat: Opentelemetry integration (#1078)

    d21b2b9
  26. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    samples: Bigtable deletion code samples (#1078)

    d5f4891
  27. thiyaguk09
    added a commit that references this issue on May 5, 2026

    samples: Bigtable deletion code samples (googleapis#1078)

    2f9daef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

api: storageIssues related to the Cloud Storage API.

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.