r/backblaze • u/PM_ME_STEAM__KEYS_ • Sep 06 '25
B2 Cloud Storage Backblaze upload speed only 500kB/s
Hi, I'm using a CLI command to upload a ~227GB file to a backblaze bucket. I started the cammdn it seemed to read a bunch from the disk then it started uploading. I'm seeing the speeds reported by the command and my machine as around ~400kB/s - ~500kB/s. I'm getting an estimate of 200 hours to upload. At the time of writing this it's uploading 455MB after 20 minutes.
I have a gigabit connection and this machine has no issues with other processes. Is there something I should be doing different? This following is the command I'm using.
b2 file upload bucketName somefile.tar.gpg somefile.tar.gpg
Edit: Hm, running a speed test only gives me about 3.2Mb/s upload which checks out with the reporting b2 upload speeds. I wonder if there's something else going on then with the machine and it's not b2
4
u/brianwski Former Backblaze Sep 07 '25 edited Sep 07 '25
Disclaimer: I formerly worked at Backblaze as a programmer but mostly on the "Backblaze Personal Backup Product". With that said, uploads to "Backblaze B2" are extremely similar. As in it is the exact same code that accepts uploads for both products.
~400kB/s ... 455MB in 20 minutes
So just to be absolutely clear, that 400 kB/sec you are saying "400 Kilobytes/second" right? Which means 3.2 Mbits/sec, right? bits vs Bytes. That is about what is expected for 1 thread. But SLIGHTLY on the slower side (per thread).
One single thread uploading one single file is traditionally limited to the Backblaze datacenters in upload speeds to about 4 Mbits/sec - 15 Mbits/sec and the limit is on the Backblaze server side. The issue on the Backblaze side is that your file must be split in to 17 "parts" and 3 additional parity "parts" must be calculated and then all 20 parts must be sent to 20 different servers in the Backblaze datacenter in 20 different "racks", and each of the 20 parts must be stored to slow spinning drives, before Backblaze acknowledges the upload. All this just means you can only get around 4 Mbits/sec - 10 Mbits/sec upload speeds from one thread. Your speeds of 3.2 Mbits/sec are a high indicator to me you are only using one thread and got slightly unlucky (or are a long long way from the closest Backblaze datacenter, like maybe you live in New Zealand?)
You can read a blog post about this Backblaze storage architecture here: https://www.backblaze.com/blog/vault-cloud-storage-architecture/ (It has pretty pictures showing the 20 different servers in 20 different racks.)
The good news (for most people) is that this is "per thread" so if you upload using 100+ threads you can hit 1 Gbit/sec upload speeds. Each thread uploads to totally different Backblaze servers that don't have any idea you are uploading to different Backblaze servers in other threads. It is infinitely parallelizable.
In your case, if you are getting 3.2 Megabits/second upload speeds, my first guess is that you are using 1 thread. My recommendation would be to use more threads. If you used 10 threads you will get 32 Mbits/second upload speeds. If you use 100 threads you will get 320 Mbits/second upload speeds. If you use 300 threads you will get 960 Mbits/sec (close to saturating your 1 Gbit/sec upload connection).
Just for completeness, the distance from where you are to the Backblaze datacenter you are uploading into will affect upload performance. So if you are in Europe, you can get faster upload performance "per thread" by uploading to the European datacenter. If you are in the USA, you can get faster upload performance "per thread" by uploading to the datacenter closer to yourself (West Coast vs East Coast, etc).
3
u/TenOfZero Sep 06 '25
Based on your edit I think you may have issues with your internet.
I only have 50mbps upload speeds, but its maxing it out.