Skip to content

Recalculate maxQueueSize based on shards count #578

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 1 commit into
base: scylla-3.x
Choose a base branch
from

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Jul 9, 2025

Currently maxQueueSize is 256 by default.
Problem is that some hosts can have 1 shard, others can have 256 shards.
While having cap of 256 pending requests for 1 shard host is ok, for bigger host of 256 shards it is way to low.
This commit scales maxQueueSize by number of shards, which allow default value works for hosts of any size.

Fix: #577

Currently maxQueueSize is 256 by default.
Problem is that some hosts can have 1 shard, others can have 256 shards.
While having cap of 256 pending requests for 1 shard host is ok.
For host of 256 shards it is way to low.
This commit scales maxQueueSize by number of shards, which allow default
value works for hosts of any size.
@dkropachev dkropachev force-pushed the dk/recalculate-max-queue-size-from-shardcount branch from 600ad77 to 1589ccc Compare July 9, 2025 16:10
@dkropachev dkropachev requested a review from Bouncheck July 9, 2025 16:10
@dkropachev dkropachev self-assigned this Jul 9, 2025
Copy link
Collaborator

@Bouncheck Bouncheck left a comment

Choose a reason for hiding this comment

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

Hard objections:
setMaxQueueSize should also have the documentation updated.

Soft objections:
While the queue is global (per host I think), the description makes you think that the limits are per shard. This is not the case in the sense that one shard may use up the whole limit.

Regarding the name maybe maxQueueSizeFactor would be more descriptive now?
Different nodes will end up having different queue sizes if the number of shards is different.

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.

2 participants