How to use sysbench for test on Percona MySQL with ZenFS file system

Hi guys,
I have created a zenfs file system on nvme device,
following steps:“Installing and configuring Percona Server for MySQL with ZenFS support”.
how to use sysbench to test for percona mysql? thanks

1 Like

Prep for the test, prep only needs to be run once.

sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-db=YOURDB --threads=4 --mysql-host=YOURHOST --mysql-user=YOURUSER --mysql-password= --tables=10 --table-size=250000 prepare

Test:

Set the threads to equal you cores to start. Increase till you find right number.

sysbench --db-driver=mysql --report-interval=2 --threads=4 --time=300 --mysql-host=YOURHOST --mysql-user=YOURUSER --mysql-password= --mysql-db=$db /usr/share/sysbench/oltp_read_write.lua run

2 Likes

Hi Wayne,
I don’t know how to create mysql-db on nvme device, because znefs is not general file system ,it is can’t mount partition. Is there any methods can to create mysql-db on device of zenfs file system to use sysbench?thanks.

1 Like

Can you connect to mysql? If you can, can you issues a create database command?

2 Likes

Hi Wayne,
Yes, I can connect to mysql and create db, this is commands show :

image

1 Like

Perfect. Then use testdb1 in the examples I gave you above. --mysql-db=testdb1

Another tip would be to run sysbench from a machine where MySQL is not running. If that an option for you.

@Sr_Foccu
Make sure you configure sysbench to create MyRocks tables. (Check the --help) The default is to make InnoDB tables which CANNOT take advantage of the ZenFS. Only MyRocks tables can do this.

2 Likes

Hi Wayne,
It can work on localhost(device:sda) by testdb1, If I would like sysbench running on nvme device how to do it ? (nvme is ZenFS drive which can’t mount partition)
thanks

check the storage command
#zenfs df --zbd=nvme0n1
Free: 29696 MB
Used: 0 MB
Reclaimable: 0 MB
Space amplification: 0%

1 Like

I have no experience with the ZenFS.

1 Like