feat: warn users who are falling behind reprovides#9886
Conversation
28cd95b to
a10e9d7
Compare
docs/config.md
Outdated
| Utilizes an alternative DHT client that searches for and maintains more information | ||
| about the network in exchange for being more performant. |
There was a problem hiding this comment.
| Utilizes an alternative DHT client that searches for and maintains more information | |
| about the network in exchange for being more performant. | |
| Utilizes an alternative DHT client that searches for and maintains more information | |
| about the network in exchange for improved provide latency performance (upwards of 100x). |
(I made up the number above - I can't remember the actual numbers. Maybe they are in the changelog for when we first released this?)
Can we maybe expand this by a sentence or two? Is there a talk or doc we can link to?
Maybe something along the lines of...
This accelerated DHT client builds up a bamp of various nodes that can satisfy the keyspace. This helps both with reads and writes:
* Reads - Traversed DHT results have been cached and know the closest nodes to query.
* Writes - In addition to having the cached traversed DHT results to know the direct n=20 nodes to store records with, records are batched so that do a single write with a large batch of records for a given provider.
(I know that's not a great writeup - but would like to have some more text that helps someone conceptually understand what is going on, or provide a link where someone can learn more so it's more self-service to reason about the system.)
There was a problem hiding this comment.
I guess some of these details are covered below in the "when it is enabled" section. I mostly just want to make sure we help explain the concept of what's happening.
There was a problem hiding this comment.
I'll rework that section in the docs, I don't think changelogs should go in that much details, just link to docs that are that detailed.
That is not the changelog.
There was a problem hiding this comment.
Btw the number is roughly 6 millions. 6 millions times faster.
(based on the assumption of 30s per bucket rt puts, vs 5µs for an accelerated swept put)
There was a problem hiding this comment.
At what percentile are we getting 30s per bucket round trip? That seems really high. I assume the p50 value is way lower, and we should compare against that.
There was a problem hiding this comment.
I belive that for all 20 provides, because almost all the time one of them will timeout and the timeout is 30s ?
Anyway 5µs is so small even if puts took 250ms this would still be way faster.
core/node/provider.go
Outdated
| } | ||
|
|
||
| // How long per block that lasts us. | ||
| expectedProvideSpeed := reprovideInterval / time.Duration(count) |
There was a problem hiding this comment.
What unit of time are we dealing with here? Seconds, milliseconds? I think for clarity, it would be good to embed that into the variable names.
There was a problem hiding this comment.
The computations are done in nanoseconds, time.Duration.String takes care of formating it in something relevent.
Go use a typed time approach, programmers do not have to care about the unit of time, they do operations on the time.Duration time (which internally use nanoseconds) and then various formating call let extract the precision wanted.
a10e9d7 to
bce9e58
Compare
bce9e58 to
d0a7e03
Compare
79a0930 to
b52d94f
Compare
4dec819 to
78d5009
Compare
BigLep
left a comment
There was a problem hiding this comment.
I left comments on config.md. I am happy to take another look if it helps, but I don't have any blockers here.
Thanks for handling!
| The [accelerated DHT client](docs/config.md#routingaccelerateddhtclient) is now | ||
| the main recommended solution for users who are hosting lots of data. | ||
| By trading some upfront DHT caching and increased memory usage, | ||
| one gets provider throughput improvements up to 6 millions times bigger dataset. |
There was a problem hiding this comment.
| one gets provider throughput improvements up to 6 millions times bigger dataset. | |
| one gets provider throughput improvements of up to 6 million times on larger datasets! |
docs/config.md
Outdated
| Utilizes an alternative DHT client that searches for and maintains more information | ||
| about the network in exchange for being more performant. |
There was a problem hiding this comment.
At what percentile are we getting 30s per bucket round trip? That seems really high. I assume the p50 value is way lower, and we should compare against that.
docs/config.md
Outdated
| - DHT operations should complete much faster than with it disabled | ||
| - A batching reprovider system will be enabled which takes advantage of some | ||
| properties of the experimental client to very efficiently put provider records into the network | ||
| - The standard DHT client (and server if enabled) are run alongside the accelerated DHT client |
There was a problem hiding this comment.
I'm not following everything here @Jorropo .
When the AcceleratedDHTClient is enabled:
- (Client) For both writing records and reading records, we use the full routing table right?
- (Server) Storing records on behalf of others and responding to queries, we use the bucket routing table right?
| - A batching reprovider system will be enabled which takes advantage of some | ||
| properties of the experimental client to very efficiently put provider records into the network | ||
| - The standard DHT client (and server if enabled) are run alongside the accelerated DHT client | ||
| - The operations `ipfs stats dht` will default to showing information about the accelerated DHT client |
There was a problem hiding this comment.
Got it. Thinking about this more, I'm wondering if we even need this comment.
A user has these options:
ipfs stats dht wanserver
ipfs stats dht lanserver
ipfs stats dht wan
ipfs stats dht lan
When the accelerated DHT client is enabled, that means its stats will be reported for ipfs stats dht wan right?
And ipfs stats dht is just shorthand for ipfs stats dht wan right?
I'm trying to understand the purpose of this comment. I don't think we should be capturing here what ipfs stats dht defaults to showing. I do think we should say that accelerated DHT client affects dht wan, but the other 3 are untouched.
bcbd21e to
93c57dc
Compare
We were quite inconsistent about this previously, some files used 1.19.1 some 1.19.x, this makes it more consistent.
93c57dc to
81a277c
Compare
81a277c to
7f263c2
Compare
hacdias
left a comment
There was a problem hiding this comment.
LGTM. Assuming everything passes, please merge.
7f263c2 to
0bd3ba7
Compare
Fixes: #9704
Fixes: #9702
Fixes: #9703
Fixes: #9419