|
| 1 | +skip_under_ci |
| 2 | +---- |
| 3 | + |
| 4 | +gen_cluster nodes=3 node_cpu_rate_capacity=(8000000000,8000000000,16000000000) |
| 5 | +---- |
| 6 | + |
| 7 | +gen_ranges ranges=200 min_key=1 max_key=10000 placement_type=even |
| 8 | +{s1,s2,s3}:1 |
| 9 | +---- |
| 10 | + |
| 11 | +# Read-only workload on first 30 ranges. 20 cores (out of 24 total in the cluster). |
| 12 | +# Because the ranges are placed evenly, initially each node will have about the same |
| 13 | +# cpu nanos per second. |
| 14 | +gen_load rate=40000 rw_ratio=1 request_cpu_per_access=500000 min_key=1 max_key=10000 |
| 15 | +---- |
| 16 | + |
| 17 | +# We want the CPU load to balance based on %cpu. But both the MMA and SMA balance |
| 18 | +# on absolute cpu-nanos, i.e. not taking into account that n3 has double the capacity. |
| 19 | +# See tracking issue: https://github.com/cockroachdb/cockroach/issues/153777 |
| 20 | +assertion stat=cpu_util type=balance ticks=6 upper_bound=1.1 |
| 21 | +---- |
| 22 | +asserting: max_{stores}(cpu_util)/mean_{stores}(cpu_util) ≤ 1.10 at each of last 6 ticks |
| 23 | + |
| 24 | +eval cfgs=(sma-count,mma-only) duration=10m metrics=(cpu,cpu_util) |
| 25 | +---- |
| 26 | +cpu#1: last: [s1=6700914166, s2=6696073333, s3=6603012499] (stddev=45053658.00, mean=6666666666.00, sum=19999999998) |
| 27 | +cpu#1: thrash_pct: [s1=185%, s2=170%, s3=189%] (sum=544%) |
| 28 | +cpu_util#1: last: [s1=0.84, s2=0.84, s3=0.41] (stddev=0.20, mean=0.70, sum=2) |
| 29 | +cpu_util#1: thrash_pct: [s1=7%, s2=6%, s3=3%] (sum=16%) |
| 30 | +artifacts[sma-count]: 3d4b1466c302acd1 |
| 31 | +failed assertion sample 1 |
| 32 | + balance stat=cpu_util threshold=(≤1.10) ticks=6 |
| 33 | + max/mean=1.20 tick=0 |
| 34 | + max/mean=1.20 tick=1 |
| 35 | + max/mean=1.20 tick=2 |
| 36 | + max/mean=1.20 tick=3 |
| 37 | + max/mean=1.20 tick=4 |
| 38 | + max/mean=1.20 tick=5 |
| 39 | +========================== |
| 40 | +cpu#1: last: [s1=6400839999, s2=6398904166, s3=7199131191] (stddev=376775185.87, mean=6666291785.33, sum=19998875356) |
| 41 | +cpu#1: thrash_pct: [s1=34%, s2=30%, s3=37%] (sum=102%) |
| 42 | +cpu_util#1: last: [s1=0.80, s2=0.80, s3=0.45] (stddev=0.17, mean=0.68, sum=2) |
| 43 | +cpu_util#1: thrash_pct: [s1=8%, s2=7%, s3=4%] (sum=20%) |
| 44 | +artifacts[mma-only]: 9d1c00f7d08f8c6d |
| 45 | +failed assertion sample 1 |
| 46 | + balance stat=cpu_util threshold=(≤1.10) ticks=6 |
| 47 | + max/mean=1.17 tick=0 |
| 48 | + max/mean=1.17 tick=1 |
| 49 | + max/mean=1.17 tick=2 |
| 50 | + max/mean=1.17 tick=3 |
| 51 | + max/mean=1.17 tick=4 |
| 52 | + max/mean=1.17 tick=5 |
| 53 | +========================== |
0 commit comments