cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

kvserver: benchmark upreplication

Open lunevalex opened this issue 4 years ago • 4 comments

In #77458 we put together a proposal to benchmark the decommissioning process. We should similarly benchmark how long it takes to up-replicate to a new node in a cluster. It is a critical process for restoring cluster stability and adding new capacity to a cluster, yet we don't have concrete measurements or benchmarks that would allow us to understand how quickly a cluster can up-replicate. The ask here is three fold:

  • create a benchmark (i.e. something in roachperf) to measure the performance of upreplication

  • use the benchmark to identify potential bottlenecks in the upreplication process

  • create a framework/function to calculate the speed of upreplication given a set of inputs i.e. in a resource unconstrained cluster with 10 nodes, 2TB node size and 256MB/s snapshot rates it should take X minutes to upreplicate to a single node.

Jira issue: CRDB-15721

lunevalex avatar Apr 14 '22 04:04 lunevalex

we already have replicate/1to3 and rebalance/xtoy roachtests in the system, so we could just piggy back on those and plumb data through to roachperf from those tests

lunevalex avatar Apr 14 '22 04:04 lunevalex

That seems like a solid plan, I'm currently working on adjacent roach tests to benchmark balance under dynamic access distribution.

I'll take a look at this one first since since It should provide some help in the above also.

kvoli avatar Apr 14 '22 13:04 kvoli

An update here, do we think that it's sufficient to only consider the elapsed duration between X under-replicated ranges and 0? The referenced test will report the time from last node join, signalling that ranges can now be up replicated, to the last allocator action. This also includes post up replication re balancing that occurs, as a background kv workload is run simultaneously.

I think here it would be best to track the total time until system steady state as the benchmark reported daily in roachperf. In the individual run timeseries, we can also include the following:

Note here that distribution is some measure of variance that is appropriate, normalized and dimensionless to enable comparison across resource classes.

(1) count of rebalancing actions undertaken
(2) replica count distribution  (avg 2m)
(3) qps distribution            (avg 30m)
(4) resource usage distribution
    (i)   cpu                   (avg 2m)
    (ii)  disk write throughput (avg 2m)
    (iii) disk read  throughput (avg 2m)
    (iv)  net  write throughput (avg 2m)
    (v)   net  read  throughput (avg 2m)

Any thoughts on the timing or smoothing for comparing the above values? I've taken them as 2min averages however I'm a bit unsure what would be appropriate here as they are only evaluation stats and don't necessarily need to be smoothed over a long duration per distribution calculation.

kvoli avatar Apr 15 '22 18:04 kvoli

Benchmarking up-replication was added in https://github.com/cockroachdb/cockroach/pull/80724

image

kvoli avatar Feb 01 '23 13:02 kvoli