Repository navigation
feat: add benchmark baseline and INFO counters - #270
Merged
Merged
Conversation
Nothing measured kvs's throughput or latency, so no later change could be shown to cost or save anything. This adds the measurements and records a first set of numbers. - `make bench` runs Go benchmarks for the store (in memory and with the append log), the RESP path through go-redis, and a three-node cluster. - `make memtier` builds kvs, starts it in memory, durable, or cluster mode on a private port, and drives it with memtier_benchmark. - `INFO` reports `total_connections_received`, `total_commands_processed`, and `used_memory`. Connection ids are now assigned after admission, so a refused connection is not counted as received. - website/content/docs/performance.md records the numbers and how to reproduce them. `make soak` also works again: it still named the repository root, which has held no Go files since the layout change.
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.
Summary
kvs had no benchmarks and no server-side counters, so nothing could show whether a change made it faster or slower. This PR adds Go benchmarks, a memtier_benchmark harness, and three
INFOfields, and records a first baseline on a new Performance docs page. It also fixesmake soak, which had failed since the layout change.Type of Change
Changes
make bench,BENCH_COUNT=n):pkg/kvs: Put/Get, serial and parallel, plus Put with the append loginternal/server: RESP SET/GET through go-redis over loopbackinternal/cluster: Put on a three-node clustertesting.TBso the benchmarks can use them.scripts/memtier.sh,make memtier BENCH_MODE=memory|durable|cluster BENCH_TIME=60):KVS_BENCH_PORTmoves it) and waits until it is ready. In cluster mode, it waits until both followers have joined.KVS_*environment settings, so a local config cannot change what gets measured.INFO:# Statsfields:total_connections_receivedandtotal_commands_processed. Queued commands count when EXEC runs them, and calls inside a script count too.# Memoryfield:used_memory, read fromruntime/metricsso INFO does not stop the world.make soak: now points at./pkg/kvsinstead of the repository root, which holds no Go files.CONTRIBUTING.md.Known limits of the recorded numbers:
A follow-up will add a prefill step and re-measure.
Changelog
changie newfragment added — one sentence, two at most, 280 characters maxTesting
make allpasses (golangci-lint 0 issues,go test ./...)make soak SOAK=2s SOAK_DOWN=0passes for both packages.make memtierruns in all three modes and leaves no processes behind.hugo --minifybuilds the docs.Related Issues
N/A