I created 16 tables with 1024 rows each.
I added print(string.format("tid=%d tnum=%d id=%d", sysbench.tid, tnum, id)) in oltp_delete.lua to check how random numbers are generated.
Then I run sysbench oltp_delete.lua --events=8 --thread=1 --rand-seed=1111 --report-interval=10. The runs usually return:
I created 16 tables with 1024 rows each.
I added
print(string.format("tid=%d tnum=%d id=%d", sysbench.tid, tnum, id))
inoltp_delete.lua
to check how random numbers are generated. Then I runsysbench oltp_delete.lua --events=8 --thread=1 --rand-seed=1111 --report-interval=10
. The runs usually return:But sometimes it returns:
The issue comes from the fact that
sysbench
usesrandom()
:Even with a single client thread there is an additional report thread which also calls
random()
. Butrandom
is not multithreaded safe: