Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to override rng seed #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raphaelsc
Copy link

@raphaelsc raphaelsc commented Sep 13, 2022

While playing with ignore-msb-bits param, there were lots of variance in node overcommit result caused by the rng picking a different seed every run. Possibly confusing an user who expects the param affects sharding inside a node, not distribution across nodes.

It's good to allow the user to feed a consistent seed across runs, such that the results with different ignore-msb-bits values will be less impacted by that variance.

BEFORE:

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 0
10 nodes, 32 vnodes, 12 shards
maximum node overcommit: 1.29554
maximum shard overcommit: 3.833120

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 12
10 nodes, 32 vnodes, 12 shards
maximum node overcommit: 1.17842
maximum shard overcommit: 1.184462

AFTER:

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 0 --random-seed 690930217
10 nodes, 32 vnodes, 12 shards
maximum node overcommit: 1.23774
maximum shard overcommit: 3.793953

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 12 --random-seed 690930217
10 nodes, 32 vnodes, 12 shards
maximum node overcommit: 1.23774
maximum shard overcommit: 1.240964

Signed-off-by: Raphael S. Carvalho [email protected]

While playing with ignore-msb-bits param, there were lots of variance
in node overcommit result caused by the rng picking a different seed
every run. Possibly confusing an user who expects the param affects
sharding inside a node, not distribution across nodes.

It's good to allow the user to feed a consistent seed across runs,
such that the results with different ignore-msb-bits values will be
less impacted by that variance.

BEFORE:

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 0
10 nodes, 32 vnodes, 12 shards
maximum node overcommit:  1.29554
maximum shard overcommit: 3.833120

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 12
10 nodes, 32 vnodes, 12 shards
maximum node overcommit:  1.17842
maximum shard overcommit: 1.184462

AFTER:

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 0 --random-seed 690930217
10 nodes, 32 vnodes, 12 shards
maximum node overcommit:  1.23774
maximum shard overcommit: 3.793953

$ ./shardsim --nodes 10 --vnodes 32 --shard 12 --ignore-msb-bits 12 --random-seed 690930217
10 nodes, 32 vnodes, 12 shards
maximum node overcommit:  1.23774
maximum shard overcommit: 1.240964

Signed-off-by: Raphael S. Carvalho <[email protected]>
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.

1 participant