sysbench icon indicating copy to clipboard operation
sysbench copied to clipboard

sysbench "--rate" : FATAL error on worker thread initialization or event generation rate

Open rsontam-tc opened this issue 1 year ago • 2 comments

I have been trying to use sysbench to use --rate option but it keeps failing with the errors described below.

Please advise if there is a valid combination of parameters to generate upwards of 5000 to 10000 transactions per second rate.

FATAL: The event queue is full. This means the worker threads are unable to keep up with the specified event generation rate

# sysbench --db-driver=pgsql --pgsql-host=xx --pgsql-port=5432 --pgsql-user=sbtest --pgsql-password=xx --tables=100 --threads=100 --rate=5000 --time=120 --pgsql-db=sbtestdb oltp_read_write run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 100
Target transaction rate: 5000/sec
Initializing random number generator from current time


Initializing worker threads...

Threads started!

FATAL: The event queue is full. This means the worker threads are unable to keep up with the specified event generation rate

FATAL: Worker threads failed to initialize within 30 seconds!

# sysbench --db-driver=pgsql --pgsql-host=xx --pgsql-port=5432 --pgsql-user=sbtest --pgsql-password=xx --tables=300 --threads=300 --rate=5000 --time=120 --pgsql-db=sbtestdb oltp_read_write run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 300
Target transaction rate: 5000/sec
Initializing random number generator from current time


Initializing worker threads...

FATAL: Worker threads failed to initialize within 30 seconds!

For the second issue, I was thinking of using the thread-ini-timeout override however that option is not exposed and when used it errors out with a message invalid option: --thread-init-timeout=300.

rsontam-tc avatar Mar 20 '23 00:03 rsontam-tc

As to server specs I tried initially with 4vCPU 8GB RAM and then with 8 vCPU and 8GB RAM. Results/errors were the same.

Thanks.

rsontam-tc avatar Mar 20 '23 00:03 rsontam-tc

The following observation may or may not be related, however, it is affecting the way my test results may be relied on.

tables=50

#time sysbench --db-driver=pgsql --pgsql-host=xx --pgsql-port=5432 --pgsql-user=sbtest --pgsql-password=xx --tables=50 --threads=1000 --time=60 --pgsql-db=sbtestdb oltp_read_write run

**real    1m21.604s**
user    0m44.307s
sys     0m36.763s

tables=60

#time sysbench --db-driver=pgsql --pgsql-host=xx --pgsql-port=5432 --pgsql-user=sbtest --pgsql-password=xx --tables=60 --threads=1000 --time=60 --pgsql-db=sbtestdb oltp_read_write run

**real    1m29.310s**
user    0m39.448s
sys     0m29.625s

There is a significant jump between 64 and lower values tested above. tables=64

#time sysbench --db-driver=pgsql --pgsql-host=xx --pgsql-port=5432 --pgsql-user=sbtest --pgsql-password=xx --tables=64 --threads=1000 --time=60 --pgsql-db=sbtestdb oltp_read_write run

**real    3m44.619s**
user    0m37.260s
sys     0m29.785s

rsontam-tc avatar Mar 20 '23 21:03 rsontam-tc