Closed ncw closed 2 years ago
I speed tested this over a long wide pipe and I couldn't see any difference in speed before and after the patch, both about 40 MiB/s falling all the way back to 900KiB/s with concurrent writes disabled as you'd expect.
Thinking about this some more
concurrency
go routines isn't necessary, only one is neededHi,
thanks for the contribution, it seems fine to me, however this code was written by @puellanivis, at the moment she has some personal issues, please wait some time for her to have a chance to have a look to the code, thanks for your patience
Indeed, sequential ordering of requests is probably a good idea, and I think I was writing it into the client updates.
There are some things I think that should be addressed, but as @drakkan mentioned, I'm currently out. (In hospital) and haven't been able to really do anything yet. This also happened as I was moving into a new apartment, and now missed the appointment for connecting my internet. 😫
Thanks for taking a look and happy to make changes when you are up to it. No hurry though and look after yourself.
Oh, I did want to mention, I did similar work already in PR 443, it might help to review that PR, and compare to what you're doing here. That'll end up being one of the first things I do myself.
Any thoughts on this PR?
Functionality was merged in with #482
This is for discussion. This is causing a real problem in rclone https://github.com/rclone/rclone/issues/5806 but there may be a better way of fixing.
Before this change, ReadFromWithConcurrency would very often submit writes to the server out of order due to small timing differences when lots of blocks were queued and ready to send.
This causes more work for the server as seeking about the file isn't free. Writing chunks of a file out of order can also cause fragmentation and consequently loss of performance on that file.
This patch causes the write to the channel to be handled synchronously but the acks are received asynchronously allowing for many write packets to be in flight as before.