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

kvserver: set StoresInterval to 10s #83808

Merged
merged 1 commit into from
Jul 14, 2022
Merged

Conversation

tbg
Copy link
Member

@tbg tbg commented Jul 5, 2022

In #81669 @kvoli discovered that we often gossip much more frequently
than at a 60s interval. Since we are also adding I/O liveness signals
to the store capacity to use in a solution for #79215, we want to make
this more reactive interval explicit.

This change has the side effect of reducing the minimum allowed value
for server.time_until_store_dead to 25s1; this seems reasonable.

Release note: None

Footnotes

  1. https://github.com/cockroachdb/cockroach/blob/263fbb7c8fcf001fcf47d7d35894b5824c78dc14/pkg/kv/kvserver/allocator/storepool/store_pool.go#L94-L99

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg requested a review from kvoli July 5, 2022 13:28
@tbg tbg marked this pull request as ready for review July 5, 2022 13:28
@tbg tbg requested a review from a team as a code owner July 5, 2022 13:28
@kvoli
Copy link
Collaborator

kvoli commented Jul 5, 2022

I think we should instrument a fix for the implicit level or add this as a gossip if you haven't in 10 seconds.

Otherwise this will compound with the existing implicit rate.

I'm looking at a fix atm for #81669

I think before we change the interval we should note with the amount of data transferred, at different intervals.

Copy link
Collaborator

@kvoli kvoli left a comment

Choose a reason for hiding this comment

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

Running some experiments at 60/30/10s

image

10s seems perfectly reasonable. Only increasing by 1% egress/ingress % of total network bandwidth.

repro

export gce_project=cockroach-ephemeral
export email=austen-gossip-interval
roachprod create $email -n 32 --gce-machine-type=n1-standard-16

roachprod put $email cockroach-remote cockroach
roachprod start $email

roachprod grafana-start $email

roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '60s';"
sleep 600
roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '30s';"
sleep 600
roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '10s';"
sleep 600
roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '60s';"
roachprod run $email -- './cockroach workload run kv --tolerate-errors --min-block-bytes=127 --max-rate=1000 --max-block-bytes=256 --read-percent=95 --concurrency=256 --drop --duration=10m'

roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '30s';"
roachprod run $email -- './cockroach workload run kv --tolerate-errors --min-block-bytes=127 --max-rate=1000 --max-block-bytes=256 --read-percent=95 --concurrency=256 --drop --duration=10m'

roachprod sql $email:1 -- -e "set cluster setting gossip.stores.interval = '10s';"
roachprod run $email -- './cockroach workload run kv --tolerate-errors --min-block-bytes=127 --max-rate=1000 --max-block-bytes=256 --read-percent=95 --concurrency=256 --drop --duration=10m'

pkg/gossip/gossip.go Outdated Show resolved Hide resolved
In cockroachdb#81669 @kvoli discovered that we often gossip much more frequently
than at a 60s interval. Since we are also adding I/O liveness signals
to the store capacity to use in a solution for cockroachdb#79215, we want to make
this more reactive interval explicit.

This change has the side effect of reducing the minimum allowed value
for `server.time_until_store_dead` to 25s[^1]; this seems reasonable.

[^1]: https://github.com/cockroachdb/cockroach/blob/263fbb7c8fcf001fcf47d7d35894b5824c78dc14/pkg/kv/kvserver/allocator/storepool/store_pool.go#L94-L99

Release note: None
@tbg tbg force-pushed the store-gossip-tick branch from c4231a1 to dd0e67a Compare July 14, 2022 07:26
@tbg
Copy link
Member Author

tbg commented Jul 14, 2022

Thanks for the experiment!

bors r=kvoli

@craig
Copy link
Contributor

craig bot commented Jul 14, 2022

Build succeeded:

@craig craig bot merged commit 2b68944 into cockroachdb:master Jul 14, 2022
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.

3 participants