Repository navigation
enable full percentile spectrum analysis on latency - #100
Conversation
yossigo
left a comment
There was a problem hiding this comment.
@filipecosta90 Thanks for this PR, I've went through most of it (maybe not enough in detail in some parts though) and added a few comments.
Nitpicking: there are some extra white space and code style issues in this PR, it would be a good idea to re-review it and clean it up.
62d6848 to
11c345b
Compare
|
Hi there @yossigo and @yaacovhazan-Redislabs I've pruned the PR and I believe it's ready for a new review. WDYT? |
git-subtree-dir: deps/hdr_histogram git-subtree-split: 04cb4a110aea00e2c995af3eaa317fe9046b944f
…he minimum required files
307b3b3 to
9dc3690
Compare
|
@filipecosta90 Thanks a lot for this effort! It's a great improvement and definitely worth the effort and time invested in it. |
Closes the round-14 R2/R3/R4/R5/R6/R7 coverage gap: the existing
read-preference suite only exercises the RESP2 path. tests/
test_read_preference_resp3.py adds three RESP3-specific cells gated by a
shared server_supports_resp3() capability probe in tests/include.py:
- test_resp3_read_preference_secondary: --protocol=resp3
--read-preference=secondary --ratio=0:1 -- asserts cmdstat_get on
replicas > 0 AND on masters == 0.
- test_resp3_read_preference_mget_secondary: adds --multi-key-get=10 to
exercise RESP3 nil parsing on the cluster MGET replica path
(closes the R3+R6 finding).
- test_resp3_read_preference_secondaryPreferred_fallback: kills one
replica via SHUTDOWN NOSAVE and asserts master_gets > 0 after, which
proves the HELLO 3 reconnect ladder on a fresh shard succeeded.
Also adds a placeholder test_readonly_retry_resp2_resp3 in
test_read_preference_failover.py that env.skip()s with a TODO referencing
#100, since deterministic -READONLY orchestration requires precise
CLUSTER FAILOVER timing against an in-flight pipeline that RLTest does
not expose.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
) On a cluster with replicas, memtier retries a -READONLY reply to the slot's primary (ee757e7, #456), but no test proved that. The only check was a placeholder in test_read_preference_failover.py that always skipped, with a stale TODO(#100). test_cluster_readonly_retry.py covers it with scripted peers on ephemeral ports, under --protocol=resp2 and resp3: a replica A answers SETs with -READONLY while B owns the key's slot. Every SET A got is then rejected, and each one is accepted exactly once by B, including SETs sent late, after the retry. Two decoy primaries, C (the seed) and D (last in the map), own no key's slot and must get no SET, so a resend to any other connection fails the test. When a cluster cell expects replicas (--use-slaves, i.e. OSS_CLUSTER_REPLICAS=1) but CLUSTER NODES lists none or can't be read, get_cluster_replica_connections() now raises instead of returning [] and letting the read-preference tests skip green. It raises rather than asserting because RLTest drops a failed assert when the test then skips. Cells without replicas still skip. The README "Testing with replicas" section and the helper docstrings describe the RLTest fork's real cluster replicas. Fixes #462 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Full percentile spectrum analysis
Fixes: #68
This PR enable full percentile spectrum analysis on query latency so that we can fully understand the performance and stability characteristics of the system we are measuring.
Right now memtier_benchmark is displaying single values targets like the average.
Considering that latency does not obey a normal distribution we should enable ourselves to do full percentile spectrum analysis. Just looking at a number might be misleading.
A useful visualization for pointing out the folly of chasing a mean measurement is illustrated below - they have nearly identical simple descriptive statistics, yet have very different distributions and appear very different when graphed.
Source: https://en.wikipedia.org/wiki/Anscombe%27s_quartet
Enabling full percentile latencies on memtier_benchmark:
The previous features can be applied with the changes added on this PR using the following added options: