-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
build: expose knob to disable GC assist #115585
build: expose knob to disable GC assist #115585
Conversation
There's more to do here before we can merge this. Hoping to get agreement on proceeding with the approach first.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable at a high level, haven't looked into GC code in depth. Curious to see how it flies.
060870c
to
03b397e
Compare
Some basic experimentation with roachprod create nathan-gc -n4 --gce-machine-type='n2-standard-16' --local-ssd=false
roachprod put nathan-gc artifacts/cockroach
# run with defaullt Go GC.
roachprod start nathan-gc:1-3
roachprod run nathan-gc:4 -- './cockroach workload init kv --splits=15 {pgurl:1}'
roachprod run nathan-gc:4 -- './cockroach workload run kv --read-percent=95 --min-block-bytes=1024 --max-block-bytes=1024 --concurrency=512 --max-rate=30000 --duration=3m --ramp=30s {pgurl:1-3}'
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 5130630 28503.5 0.9 0.9 1.3 2.9 60.8 read
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 269582 1497.7 2.5 2.2 4.2 7.1 65.0 write
# run without Go GC assist.
roachprod stop nathan-gc
roachprod start nathan-gc:1-3 --env=GODEBUG=gcnoassist=1
roachprod run nathan-gc:4 -- './cockroach workload run kv --read-percent=95 --min-block-bytes=1024 --max-block-bytes=1024 --concurrency=512 --max-rate=30000 --duration=3m --ramp=30s {pgurl:1-3}'
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 5129567 28497.4 0.8 0.9 1.2 1.7 27.3 read
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 270662 1503.7 2.2 2.2 2.9 4.1 23.1 write
# run without Go GC assist and reduced GC rate.
roachprod stop nathan-gc
roachprod start nathan-gc:1-3 --env=GODEBUG=gcnoassist=1 --env=GOGC=800
roachprod run nathan-gc:4 -- './cockroach workload run kv --read-percent=95 --min-block-bytes=1024 --max-block-bytes=1024 --concurrency=512 --max-rate=30000 --duration=3m --ramp=30s {pgurl:1-3}'
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 5130241 28501.3 0.9 0.9 1.2 1.6 60.8 read
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 269844 1499.1 2.2 2.2 2.8 3.8 56.6 write
# run with Go GC assist and reduced GC rate.
roachprod stop nathan-gc
roachprod start nathan-gc:1-3 --env=GOGC=800
roachprod run nathan-gc:4 -- './cockroach workload run kv --read-percent=95 --min-block-bytes=1024 --max-block-bytes=1024 --concurrency=512 --max-rate=30000 --duration=3m --ramp=30s {pgurl:1-3}'
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 5128790 28493.3 0.9 0.9 1.2 1.7 62.9 read
_elapsed___errors_____ops(total)___ops/sec(cum)__avg(ms)__p50(ms)__p95(ms)__p99(ms)_pMax(ms)__total
180.0s 0 271302 1507.2 2.4 2.2 3.8 5.2 56.6 write |
Wow, nice tail latencies. |
Fixes cockroachdb#115584. This commit updates our patched Go runtime to expose a knob to disable the runtime's GC assist mechanism. The knob is exposed under the `GODEBUG` environment variable, and can be accessed with `GODEBUG=gcnoassist=1`. For now, this is just meant for experimentation purposes. It will assist us as we look to reduce the impact the GC has on tail latency. Release note: None
03b397e
to
06bc890
Compare
TFTR! Merging since @rail is planning to bump the go version to go1.21.5 later today. bors r+ |
Build succeeded: |
Fixes #115584.
This commit updates our patched Go runtime to expose a knob to disable the runtime's GC assist mechanism. The knob is exposed under the
GODEBUG
environment variable, and can be accessed withGODEBUG=gcnoassist=1
.For now, this is just meant for experimentation purposes. It will assist us as we look to reduce the impact the GC has on tail latency.
Release note: None