Repository navigation
Conversation
The consensus tick visited every partition of a shard every 10 ms, and a visit of an idle partition found nothing to do. Idle CPU grew with the partition count: about 350% of one core per node at 30,000 partitions. A partition now sleeps while it is quiet: Normal status, nothing to commit, replicate, persist, repair or transfer, and no report or gauge that waits for a visit. The partition table keeps one wake tick per slot, the earliest timer deadline of the partition. Every accessor that hands out a partition wakes it, so a frame, an I/O turn or a reconcile step needs no call of its own. A partition that is not plainly idle stays due on every tick, so the visit countdowns of repair, transfer and the view fence run as before. The WAL and repair ring gauges count sleeping partitions too, so they are now sums of what each partition showed at its last visit. A debug build tests every sleeping partition on every tick and fails on one with work. A release build tests eight per tick, counts them in partition_missed_wakeups and wakes them. The simulator and its fuzzer can make every tick visit every partition, and tests require the same executor schedule in both modes, also across crashes, restarts and state transfers. Three idle nodes with 30,000 partitions each: 350% -> 13% of one core per node. A node visited 30,000 partitions on each of its 100 ticks per second, and partition_tick_visits now counts 50,000 visits per second.
hubcio
force-pushed
the
perf/partition-deadline-scheduler
branch
from
November 14, 2026 17:23
3d5a0c5 to
c0cd463
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The consensus tick visited every partition of a shard every 10 ms,
and a visit of an idle partition found nothing to do. Idle CPU
grew with the partition count: about 350% of one core per node at
30,000 partitions.
A partition now sleeps while it is quiet: Normal status, nothing
to commit, replicate, persist, repair or transfer, and no report
or gauge that waits for a visit. The partition table keeps one
wake tick per slot, the earliest timer deadline of the partition.
Every accessor that hands out a partition wakes it, so a frame, an
I/O turn or a reconcile step needs no call of its own. A partition
that is not plainly idle stays due on every tick, so the visit
countdowns of repair, transfer and the view fence run as before.
The WAL and repair ring gauges count sleeping partitions too, so
they are now sums of what each partition showed at its last visit.
A debug build tests every sleeping partition on every tick and
fails on one with work. A release build tests eight per tick,
counts them in partition_missed_wakeups and wakes them. The
simulator and its fuzzer can make every tick visit every
partition, and tests require the same executor schedule in both
modes, also across crashes, restarts and state transfers.
Three idle nodes with 30,000 partitions each: 350% -> 13% of one
core per node. A node visited 30,000 partitions on each of its 100
ticks per second, and partition_tick_visits now counts 50,000
visits per second.