benchbase icon indicating copy to clipboard operation
benchbase copied to clipboard

use threadlocal random generator to avoid contention

Open eivanov89 opened this issue 1 year ago • 3 comments

This is updated pull request, previous one is here.

Copy-pasted description:

I noticed a very high CPU consumption, when import initial TPC-C data. According the attached flamegraph all threads are in TPCCUtil:::randomStr. Because of util.RandomGenerator there is a contention. This patch uses thread local random generator, which helps to avoid contention and dramatically reduces CPU consumption.

eivanov89 avatar Nov 26 '23 17:11 eivanov89