Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploads are slow / request to benchmark uploads #19

Open
OscarEriksen opened this issue Mar 2, 2018 · 5 comments
Open

Uploads are slow / request to benchmark uploads #19

OscarEriksen opened this issue Mar 2, 2018 · 5 comments

Comments

@OscarEriksen
Copy link

Hi,

We have a platform where we usually upload up to 50 files from a user (images), where each upload can take up to 20 seconds for an image of 2MB. We have found that the uploads are extremely slow in regards of this. I was in contact with Backblaze B2-support and they suggested maybe it has something to do with HTTPS-verification or such things.

I will try to create an isolated test-case, but until then - do you have any thoughts on this? Is it a mis-configured server on our end; or are uploads typically these slow?

@cwhite92
Copy link
Owner

cwhite92 commented Mar 2, 2018

This library uses Guzzle, which internally uses cURL, so I imagine any slowness would be down to something on your end - a misconfigured server, a slow connection to Backblaze's data center or similar.

If you can provide a reliable test case I can certainly try it on my end.

@OscarEriksen
Copy link
Author

Thanks for a prompt reply! We're running on Linode. I will do some benchmarking and a test case from different providers and get back to you.

@iammichiel
Copy link

Try running an upload using blackfire. If all time is spend in the curl call, it might be network related rather than code related.

@OscarEriksen
Copy link
Author

Backblaze generally recommends uploading in parallell or on multiple threads, and has their datacenters in the US for now only. That is probably the reason. I'll get back to you with a blackfire log.

@iammichiel
Copy link

iammichiel commented Mar 16, 2018

Hm. They recommend using parallel upload given a certain filesize. I can confirm however that there is a 200/300ms latency for each roundtrip from Europe. If you don't have a cached authorization token, that can be up to 3 trips before you even start uploading.

  1. Getting the Authorization token
  2. Checking the file does not exist
  3. Getting the upload Token
  4. Start uploading

And only then, start the uploading. A blackfire profile would be cool to go a little further indeed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants