Skip to content
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

Make beacon processor queue sizes dynamic #5573

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Apr 12, 2024

Issue Addressed

Some users have complained of their nodes rejecting attestations due to full queues. The current size of 16k was good before, but it's insufficient for the current mainnet's size. Instead of playing catch with these numbers, we can make them dynamic on the validator set size. The set size is not meant to change significantly between client restarts so sampling once at start-up should be sufficient.

Proposed Changes

Make beacon processor queue sizes dynamic, and some of its values variable on initial active validator set size. This change allows future testing of the processor where we want to make the queue very short to test their behavior.

NOTE: I have not changed any numbers except for attestation_queue, unknown_block_attestation_queue. Happy to change or justify existing numbers if you have rationales.

@realbigsean realbigsean added the ready-for-review The code is ready for review label Apr 16, 2024
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, very simple. I was thinking of dynamic as adjusting the queue size as the validator set grows but doing it once at startup is a big gain for very little complexity 👍 I don't think it's clear that fully dynamic is really worth the complexity.

I made a minor suggestion, feel free to take it or leave it.

beacon_node/beacon_processor/src/lib.rs Outdated Show resolved Hide resolved
beacon_node/beacon_processor/src/lib.rs Outdated Show resolved Hide resolved
beacon_node/beacon_processor/src/lib.rs Outdated Show resolved Hide resolved
beacon_node/beacon_processor/src/lib.rs Show resolved Hide resolved
@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels May 21, 2024
@dapplion dapplion force-pushed the dynamic-queue-size branch from 0b8f4eb to 35ac9f4 Compare May 30, 2024 10:18
@dapplion dapplion added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels May 30, 2024
@michaelsproul
Copy link
Member

Nominating this for 5.2 as we are increasingly seeing queues filling up shortly after a restart

@michaelsproul michaelsproul added the v5.2.0 Q2 2024 label May 30, 2024
michaelsproul added a commit that referenced this pull request May 31, 2024
Squashed commit of the following:

commit 35ac9f4
Author: dapplion <[email protected]>
Date:   Thu May 30 13:15:50 2024 +0300

    Review PR

commit 7a4e44b
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:24:44 2024 +0900

    lint

commit 7590494
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:05:06 2024 +0900

    Update tests

commit 9460d58
Author: dapplion <[email protected]>
Date:   Fri Apr 12 15:17:27 2024 +0900

    Make beacon processor queue sizes dynamic
@michaelsproul michaelsproul mentioned this pull request May 31, 2024
michaelsproul added a commit that referenced this pull request Jun 3, 2024
Squashed commit of the following:

commit 35ac9f4
Author: dapplion <[email protected]>
Date:   Thu May 30 13:15:50 2024 +0300

    Review PR

commit 7a4e44b
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:24:44 2024 +0900

    lint

commit 7590494
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:05:06 2024 +0900

    Update tests

commit 9460d58
Author: dapplion <[email protected]>
Date:   Fri Apr 12 15:17:27 2024 +0900

    Make beacon processor queue sizes dynamic
jimmygchen added a commit that referenced this pull request Jun 3, 2024
Squashed commit of the following:

commit 35ac9f4
Author: dapplion <[email protected]>
Date:   Thu May 30 13:15:50 2024 +0300

    Review PR

commit 7a4e44b
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:24:44 2024 +0900

    lint

commit 7590494
Author: dapplion <[email protected]>
Date:   Fri Apr 12 16:05:06 2024 +0900

    Update tests

commit 9460d58
Author: dapplion <[email protected]>
Date:   Fri Apr 12 15:17:27 2024 +0900

    Make beacon processor queue sizes dynamic
@michaelsproul
Copy link
Member

@Mergifyio queue

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jun 3, 2024
Copy link

mergify bot commented Jun 3, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 2c971fa

mergify bot added a commit that referenced this pull request Jun 3, 2024
@mergify mergify bot merged commit 2c971fa into sigp:unstable Jun 3, 2024
28 checks passed
@dapplion dapplion deleted the dynamic-queue-size branch June 5, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge. v5.2.0 Q2 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants