Make immutable downloads less chatty #1251
No reviewers
Labels
No Label
Benchmarking and Performance
HTTP Storage Protocol
Nevow Removal
Python 3 Porting
not-for-merge
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: tahoe-lafs/tahoe-lafs#1251
Loading…
Reference in New Issue
No description provided.
Delete Branch "3946-less-chatty-downloads"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When latency is non-zero (i.e. anything not a LAN) this has huge improvement to download times, with both HTTP and Foolscap.
Downside: on Foolscap this increases CPU usage somewhat. Still seems worth it, presumably most Tahoe-LAFS interactions are not over LAN.
Fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3946
Coverage: 94.838% (-0.02%) from 94.859% when pulling
acc9cd2f9f
on 3946-less-chatty-downloads into54a6098d33
on master.Thanks. I think I have to learn some more stuff before I can give an approving review.
@ -39,2 +39,3 @@
await reconfigure(reactor, request, alice, (1, case.params.required, case.params.total), case.convergence)
await reconfigure(
reactor, request, alice, (1, case.params.required, case.params.total), case.convergence, case.segment_size)
The other
reconfigure
caller in this module also needs to be updated to pass a value formax_segment_size
. It has a value handy and it has strong feelings about what the segment size needs to be.It looks like
allmydata.interfaces.DEFAULT_MAX_SEGMENT_SIZE
is undocumented.I think this PR assumes that it is the segment size a client node will use when encoding CHK (aka "immutable") shares - unless the node is otherwise configured with the new config option being added.
In particular, it won't affect existing CHK shares and it won't affect SSK (SDMF/MDMF) (aka "mutable") shares.
If that matches your understanding, can you add a comment to the definition of
DEFAULT_MAX_SEGMENT_SIZE
?Uhh this is so weird. Guess a value that is trivially readable from the front of any share and derive a bunch of real values from it -- then replace all those values with the real values after doing the trivial read -- supposedly as an optimization for
Segmentation
-- which cannot possibly work correctly if you guessed wrong? :/ :/ :/ :/I guess I get to read some more of
allmydata/immutable/downloader/
now...Perhaps the integration test suite is better suited to this kind of thing?
That matches my understanding, yes.
If it can't work if you guess wrong then this PR is no good :(
But if you can get the segment value from trivial read... I should do that instead?
Hmhm. I was thinking I'd need to push the segment size through another N layers of abstraction but I guess with a config option then maybe not?
Note that the integration test failure with i2pd will be fixed when #1250 is merged.
It seems like incorrect guesses don't impair functionality. Maybe they make performance slightly worse or something (we could try to measure but I don't particularly want to at the moment).
So I think this part is fine as-is.
This looks good to me (in particular, I can't see how it would break compatibility with existing clients or stored data - and the new integration test seems to support this conclusion pretty well).