Tag: Lua
-
Lua sysbench – crash course
This is a follow-up on my previous blog post about using Lua enabled sysbench. Today I will dive into how to write Lua scripts for sysbench. Look at this simple example:
There are 3 functions prepare(), cleanup() and help(). Those are executed when sysbench is asked to perform the respective action (i.e. sysbench … help).
If you do sysbench … run then things are different. First sysbench starts the requested number of threads and executes the thread_init() function for each. […]
-
Using Lua-enabled sysbench
A quite common benchmark for MySQL is sysbench. It was written nearly 10 years ago by Alexey Kopytov.
Sysbench has modes to benchmark raw CPU performance, mutex speed, scheduler overhead and file IO performance. The probably most often used sysbench mode is OLTP. This benchmark mimics a OLTP scenario with small transactions hitting an optimized database. There are many variables to play with, most important is the number of simulated application threads (option –num-threads). The OLTP benchmark can be run […]