-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adjust ConnMgr to 32/96 #9483
Conversation
@BigLep thank you for looking into this. The number of connections at a time will usually be slightly higher than HighWater (highWater triggers GC, but in the meantime new peers connected to us because we are dhtserver, and next gracePeriod is 1-20s away). For example, setting HighWater to 96 eventually typically hovers between 150-170. I've set it to 120 as you suggested but suggest going with bit lower values (32/96) if we really want to move average connection count down – lmk if I should update this PR to 32/96, or keep it 50/120. |
Looks like we should figure out scaling this based on ressource manager or system memory aswell. |
Interesting. I don't know enough here and I'm not sure the full ramification of the tradeoff. For example, we see really high success rates of finding content over bitswap (https://www.notion.so/pl-strflt/Bitswap-measurements-draft-report-c64694c1a9ae4389a86e34e7bf2baf6e#e0b2e3258b304ae0b85bfcfba8c8db41 ) but that is also with a lot of connected peers. We have a strong datapoint of what has been working for Brave for a year plus now which his what makes me comfortable to drop it from the previous really high values. Maybe just go with 120 now and we get probelab engagement more for future? |
@BigLep imo we should not look at the bitswap flood success rate and try to chase that. This comes at the cost of flooding the network with thousands of requests per second which create lots of load, we will stop flooding the network in Q1 or Q2 of 2023 when the work of move the bytes is released mainstream. |
@Jorropo : ack understood. I'm not saying we should keep flooding. The area of uncertainty for me is around how much unexpected benefit are we getting from flooding and the potential impact of reducing it without having something else filling in like new transports from Move the Bytes. I guess the strongest datapoint we have right now is that Brave/Desktop have lower limits and they work. As a result, I'm comfortable reducing the numbers to 32/96 as you suggest Lidel and we can increase if we got this wrong. |
Ack, let's try 32/96 in RC1, we can adjust in RC2 if needed. |
953005f
to
fde94af
Compare
I don't have much visibility on what We also observed that most of the content was served by a small number of peers, and most of them are nft.storage and other large providers. Hence, these large providers may have different Connection Manager settings adapted to serve content to many peers.
|
@guillaumemichel The direction of active connection can be inspected via My gut feeling is this is unlikely, unless some peering agreement was set up between peers. |
I think that reducing the This will likely result in a drop of the Bitswap discovery success rate, but it isn't a big deal as content routers (DHT, IPNI) are fast. However reducing Bitswap |
This is follow-up for #9467
Rationale
#9467 (comment) from @BigLep :