Randomize the random number generator's seed used in redis-benchmark#8174
Randomize the random number generator's seed used in redis-benchmark#8174madolson merged 1 commit intoredis:unstablefrom x77a1:unstable
Conversation
The pid of the benchmark process is used to randomize the random number generator's seed. This ensures that when multiple benchmark processes are started at the same time to generate load on a server, they use different seeds. This will ensure randomness in the keys generated by different benchmark processes.
madolson
left a comment
There was a problem hiding this comment.
Thanks for contributing!
|
@madolson @x77a1 I believe this should be further discussed. IMHO this is adding further randomness, a bad type of randomness which is the uncontrollable one.
Then in your use case you can use different deterministic seeds in different benchmark processes. |
|
@filipecosta90 A seed config is a good idea. However, I am not able to understand why using time as seed generates good randomness and using (time ^ getpid()) as seed generates a bad randomness. Could you please elaborate? |
…edis#8174) The pid of the benchmark process is used to randomize the random number generator's seed. This ensures that when multiple benchmark processes are started at the same time to generate load on a server, they use different seeds. This will ensure randomness in the keys generated by different benchmark processes.
The pid of the benchmark process is used to randomize the random number generator's
seed. This ensures that when multiple benchmark processes are started at the same time
to generate load on a server, they use different seeds. This will ensure randomness in
the keys generated by those benchmark processes.