Where the open source database community meets: Use code PERCONA75 and secure your spot for Percona Live.  Register

Sysbench with support of multi-tables workload

April 29, 2011
Author
Vadim Tkachenko
Share this Post:

We just pushed to sysbench support for workload against multiple tables ( traditionally it used only single table).

 

It is available from launchpad source tree lp:sysbench .

 

This is set of LUA scripts for sysbench 0.5 ( it supports scripting), and it works following way:

 

– you should use --test=tests/db/oltp.lua to run OLTP test

i.e. prepare

 

 

run:

 

 

 

 

oltp.lua should understand most options that available for regular sysbench –test=oltp

 

there are couple other scripts, like
oltp_simple

select

insert

delete

update_index

update_non_index

 

to support different OLTP modes.

 

Most interesting: all scripts support --oltp-tables-count=N ( default 1), in this case N sbtest tables will be used.

 

Additional parameter --oltp-secondary is taken from Mark Callaghan’s sysbench tree , in this case

table sbtest will be created with KEY xid (ID) , instead of PRIMARY KEY (ID)

 

Now, as we have N tables, we may want to prepare them in parallel, to save some time for preparation

I implemented that in script parallel_prepare.lua

 

so instead of

 

 

you may use

 

 

( please note that oltp-tables-count should be multiplier of num-threads)

 

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
sztanpet
sztanpet
15 years ago

please note that lua is not an acronym, so no need to capitalize it

vineet
vineet
14 years ago

Hi Vadim,

May i know your views on benchmark tool HammerOra for MySQL (http://hammerora.sourceforge.net/).

According to me this tool is very handy and gives tpc-c benchmark results.

BR,
Vineet

Yen-Wei Liu
Yen-Wei Liu
14 years ago

Hi,

I noticed in your benchmark tests, you use “oltp_tables_count” instead of “oltp-tables-count” as shown here. Which one is correct ? Underscored or dashed ?

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved