storage_write: track nbytespending per connection#661
storage_write: track nbytespending per connection#661
Conversation
Also, move "select which connection to use" earlier. This does not change any program behaviour, but will be useful in the following commit.
If --aggressive-network is used, this effectively multiplies MAXPENDING_WRITEBYTES by almost 8.
|
I tried a quick test with three random 50M files, and surprisingly this was about 1.5% faster. I was expecting it to be no change, since the actual uploading takes much longer than chunkification, so it shouldn't matter if we had 5M or almost 40M cache. Upload times with master: 90.6, 91.05, 90.34 (mean 90.66). (If we were archiving directories that we'd previously archived -- say, making an hourly archive of a mail server -- then we should expect the larger cache to matter.)
|
| case 0: | ||
| /* This write operation is no longer pending. */ | ||
| C->S->nbytespending -= C->flen; | ||
| if (C->S->nbytespending[C->conn] < C->flen) { |
There was a problem hiding this comment.
This is probably a good idea?
I mean, other than random memory corruption, I can't think of why this might occur. Now, if we have random corruption, then this check could be useful... but likely a whole bunch of other things would break anyway. shrug
No description provided.