Skip to content

Conversation

@angeladietz
Copy link
Contributor

Previously, the datadriven asim tests expressed node capacity in nanoseconds/core which are difficult to read due to lots of zeros. Now, the node capacity is expressed in cores (float) which is much more readable and less prone to user error. For example, node_cpu_rate_capacity=8000000000 is now expressed as node_cpu_cores=8.

Fixes #156845
Epic: CRDB-55052
Release note: none.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@angeladietz angeladietz force-pushed the node-capacity-units branch 2 times, most recently from 4a9612c to 8972085 Compare November 20, 2025 19:52
Previously, the datadriven asim tests expressed node capacity in
nanoseconds/core which are difficult to read due to lots of zeros.
Now, the node capacity is expressed in cores (float) which is much more
readable and less prone to user error. For example,
`node_cpu_rate_capacity=8000000000` is now expressed as `node_cpu_cores=8`.

Fixes cockroachdb#156845
Epic: CRDB-55052
Release note: none.
@angeladietz angeladietz marked this pull request as ready for review November 20, 2025 21:07
@angeladietz angeladietz requested review from a team as code owners November 20, 2025 21:07
@angeladietz
Copy link
Contributor Author

For now, i only updated the the node capacity in the input format, but not in the underlying data structures, like BasicCluster.NodeCPURateCapacity and ClusterInfo.NodeCPURateCapacityNanos. Should the CPU units be updated there too, or is it only the input format we're worried about?

Copy link
Contributor

@wenyihu6 wenyihu6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only the input, so this should be enough.
:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained


pkg/kv/kvserver/asim/state/node_cpu_cores_test.go line 14 at r1 (raw file):

)

func TestNodeCPUCores_ToRateCapacityNanos(t *testing.T) {

Nice test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

asim: specify node capacity in cores, not nanos/sec

3 participants