Skip to content

Commit f36b72d

Browse files
committed
asim: don't swallow warning about unrealistic node capacity
We can address them in a separate PR.
1 parent cb5ef1f commit f36b72d

11 files changed

+16
-2
lines changed

pkg/kv/kvserver/asim/tests/datadriven_simulation_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func TestDataDriven(t *testing.T) {
314314
var nodes = 3
315315
var storesPerNode = 1
316316
var storeByteCapacity int64 = 256 << 30 /* 256 GiB */
317-
var nodeCPURateCapacity int64
317+
var nodeCPURateCapacity int64 = 8 * 1e9 // 8 vcpus
318318
var region []string
319319
var nodesPerRegion []int
320320
scanIfExists(t, d, "nodes", &nodes)
@@ -334,9 +334,13 @@ func TestDataDriven(t *testing.T) {
334334
var buf strings.Builder
335335
if c := float64(nodeCPURateCapacity) / 1e9; c < 1 {
336336
// The load is very small, which is likely an accident.
337+
// TODO(mma): fix up the tests that trigger this warning.
338+
// TODO(mma): print a warning whenever the measured CPU utilization
339+
// on a node exceeds this capacity, as that's likely not what the test
340+
// intended.
337341
_, _ = fmt.Fprintf(&buf, "WARNING: node CPU capacity of ≈%.2f cores is likely accidental\n", c)
338342
}
339-
return ""
343+
return buf.String()
340344
case "load_cluster":
341345
var cfg string
342346
scanMustExist(t, d, "config", &cfg)

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_constraint_satisfaction1.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ skip_under_ci
55
# a(n1.n2) b(n3,n4) c(n5) d(n6-n9)
66
gen_cluster nodes=9 region=(a,b,c,d) nodes_per_region=(3,2,1,3) node_cpu_rate_capacity=50000
77
----
8+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
89

910
# specify non-voters
1011
# (s1-3: region a) (s4-5: region b) (s6: region c) (s7-9: region d)

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_constraint_satisfaction_old_alloc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ skip_under_ci
55
# a(n1.n2) b(n3,n4) c(n5) d(n6-n9)
66
gen_cluster nodes=9 region=(a,b,c,d) nodes_per_region=(3,2,1,3) node_cpu_rate_capacity=50000
77
----
8+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
89

910
# specify non-voters
1011
# (s1-3: region a) (s4-5: region b) (s6: region c) (s7-9: region d)

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_high_cpu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ skip_under_ci
33

44
gen_cluster nodes=10 node_cpu_rate_capacity=800000
55
----
6+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
67

78
# Set the rebalance mode to use the mma store rebalancer and disable the lease
89
# and replicate queues so that only the mma store rebalancer is moving replicas

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_high_cpu_25nodes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ skip_under_ci
33

44
gen_cluster nodes=25 node_cpu_rate_capacity=800000
55
----
6+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
67

78
setting split_queue_enabled=false
89
----

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_high_cpu_skewed_placement.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
gen_cluster nodes=7 node_cpu_rate_capacity=50000
22
----
3+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
34

45
# The placement will be skewed, s.t. n1/s1, n2/s2 and n3/s3 will have all the
56
# replicas initially and n1/s1 will have every lease. Each range is initially

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_high_cpu_unable_to_shed_leases.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# rebalancing away from the store occurs.
88
gen_cluster nodes=5 node_cpu_rate_capacity=90000
99
----
10+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
1011

1112
setting split_queue_enabled=false
1213
----

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_high_write_uniform_cpu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ skip_under_ci
33

44
gen_cluster nodes=10 node_cpu_rate_capacity=30000
55
----
6+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
67

78
# Read only workload, which generates 100_000 request cpu nanos/s evenly over
89
# the first half of the keyspace, which will be on all stores initially.

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_one_voter_skewed_cpu_skewed_write.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ skip_under_ci
55

66
gen_cluster nodes=2 node_cpu_rate_capacity=100000
77
----
8+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
89

910
gen_ranges ranges=100 repl_factor=1 min_key=1 max_key=10000 placement_type=replica_placement bytes=26843545
1011
{s1}:1

pkg/kv/kvserver/asim/tests/testdata/non_rand/mma_skewed_cpu_skewed_write.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ skip_under_ci
1010

1111
gen_cluster nodes=6 node_cpu_rate_capacity=50000
1212
----
13+
WARNING: node CPU capacity of ≈0.00 cores is likely accidental
1314

1415
# The placement will be skewed, s.t. n1/s1, n2/s2 and n3/s3 will have all the
1516
# replicas initially and n1/s1 will have every lease. Each range is initially

0 commit comments

Comments
 (0)