Inconsistent upload speeds using Uplink C

I use the C library for Uplink from Objective C, and notice that I get great speeds and then it just stops for sometimes a few seconds, sometimes much longer. Is this to be expected? Or is it a bug in my implementation? It specifically hangs on uplink_upload_write and I am using a buffer size of 16KB. My internet connection should not the issue.

It is probably the case that you’ve happened to get an unfortunate batch of storage nodes for the upload. Your upload can’t succeed until the fastest N nodes have accepted their pieces. We try to tune the redundancy parameters such that, most of the time, the fastest N nodes are fast enough for good performance. But an unlucky draw can mean the Nth fastest node is not as fast as you need it to be.

People tend to get the best overall performance with a lot of parallelism. (8x-64x is the typical range, I think?) This smoothes out the traffic flow so that these latency spikes don’t affect things much. Is that an option for you?


One common observation is that some consumer routers doing NAT cannot handle too many concurrent connections and fail in weird ways, for example by periodically dropping established connections. With the uplink protocol if you set your parallelism to a high number, you can easily reach such limits. Make sure this is not the case for you.


Thank you very much for the detailed reply. That makes perfect sense and means I can breathe a sigh of relief it’s not something on my end.

As far as the parallelism is concerned, absolutely. I’m going to begin re-architecting everything to achieve that. The speeds are great most of the time and work fine for the photos, but this has been the only hiccup. So this is going to be a huge win – thanks again!

@Toyoo That’s interesting, thank you. I don’t think it applies to this case but good to keep in mind going forward.


Have a look at this thread Question about UDP - #7 by elek