OLTP benchmark in sysbench 0.5

Asked by Kazuhisa Ichikawa

Hi!

Is OLTP benchmark support removed in sysbench 0.5? Here is the error that I got when I tried to prepare oltp benchmark. Or am I missing something?

# sysbench --version
sysbench 0.5

# sysbench --test=oltp --oltp-table-size=10000 --mysql-db=test --mysql-user=root prepare
sysbench 0.5: multi-threaded system evaluation benchmark

PANIC: unprotected error in call to Lua API (cannot open oltp: No such file or directory)

Question information

Language:
English Edit question
Status:
Solved
For:
sysbench Edit question
Assignee:
No assignee Edit question
Solved by:
Alexey Kopytov
Solved:
Last query:
Last reply:
Revision history for this message
Best Alexey Kopytov (akopytov) said :
#1

Hi Kazuhisa,

The OLTP test in sysbench 0.5 was rewritten in Lua. So the command to run it in 0.5 would be:

sysbench --test=/path/to/oltp.lua --oltp-table-size=10000 --mysql-db=test --mysql-user=root prepare

The oltp.lua script can be found in sysbench/tests/db in the source root directory.

Revision history for this message
Kazuhisa Ichikawa (kahzoo) said :
#2

Hi Alexey,

--test=/path/to/oltp.lua worked just fine.

Thanks so much.

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) said :
#3

Hi Alexey,

it would save users some time if this would be reflected in the README.

Thanks!

Revision history for this message
Alexey Kopytov (akopytov) said :
#4

Hi Vladimir,

I agree. And properly documenting 0.5 is a long overdue task on my TODO.

Revision history for this message
Michael Skiba (opensource-michael-skiba) said :
#5

I came here because I faced the same problem. Is there a reason to have the necessity to specify a path? Wouldn't it be easier overall to just assume all tests reside in the tests folder?

Revision history for this message
Alexey Kopytov (akopytov) said :
#6

Hi Michael,

That would of course work if sysbench was invoked from the directory where the 'tests' directory resides. Which is usually the case when one uses a self-compiled binary from a Git/Bzr repository, for example.

That may not be the case when sysbench is installed from a distribution package, e.g. path to the binary may be /usr/bin/sysbench, and test files are installed under distribution-specific path such as /usr/share/sysbench/...

That's why sysbench still expects a path, either an absolute or relative one. I'm going to simplify this in the future by converting sysbench into a full-fledged Lua interpreter, so one could execute benchmarks scripts directly, much like Bash or Perl scripts are executed.