sysbench-developers team mailing list archive
-
sysbench-developers team
-
Mailing list archive
-
Message #00014
Re: [Merge] lp:~hakan-askmonty/sysbench/hakan into lp:sysbench
On 28.10.2010, at 21:56, Alexey Kopytov wrote:
>> That means that the ranges should be different for every thread. I tried to
>> simulate that by
>> params[i] = sb_rand(thread_id, oltp_table_size)
>>
>> Maybe there is a better way to handle this?
>>
>
> Yes, I think there should be a better way.
>
> Given that the number of threads is typically much lower than oltp_table_size, there will be a significant overlap in produced ranges for random values, i.e. they won't be that different.
>
> To prevent overlapping (i.e. make them really different) you need to partition the whole table into num_threads segments and then make each thread work with its own segment. That is, something like:
>
> params[i] = sb_rand(oltp_table_size / num_threads * thread_id, oltp_table_size / num_threads * (thread_id + 1)).
>
> Does this make sense?
>
Your proposal makes a lot more sense. I will change the code and apply for
another merge.
Best,
Hakan
--
Hakan Küçükyılmaz, QA/Benchmark Engineer, Stuttgart/Germany
Monty Program Ab, http://askmonty.org/
Skype: hakank_ Phone: +49 171 1919839
--
https://code.launchpad.net/~hakan-askmonty/sysbench/hakan/+merge/39548
Your team sysbench-developers is subscribed to branch lp:sysbench.
References