Skip to content

Reduce ping latency #8344

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

First patch was to help me test pings across the network. But the real fix is the final one: we now process more messages before ignoring peer while we wait for them to be queued to other subdaemons.

See-also: #7742
See-also: #8308

@rustyrussell rustyrussell added this to the v25.09 milestone Jun 11, 2025
One reason why ping processing could be slow is that, once we receive
a message from the peer to send to a subdaemon, we don't listen for
others until we've drained that subdaemon queue entirely.

This actually happens, though, for reestablish: we really can take more
than a second to set that subdaemon up.

Signed-off-by: Rusty Russell <[email protected]>
…sage.

If we do this, we can cause delays in non-channel messages (like
gossip, and pings).  On a busy system, a WIRE_REESTABLISH message can
easily take a second to resolve, as a new subdaemon has to be spun up
and connected before we can drain the queue).

It also should be slightly more efficient in processing common packet
patterns (ADD then COMMITMENT_SIGNED, etc).

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: We will now process incoming non-channel messages (gossip, pings) in a more timely manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant