Announcing SysbenchRocks – the repository of sysbench extensions

2 minute read

I am thrilled to announce SysbenchRocks – the repository for sysbench benchmarks, libraries and extensions written in Lua. The idea has been discussed many times with various people for more than a year, so you can imagine how excited my face is while I’m typing this. The entire infrastructure is based on LuaRocks, the Lua package manager.


On the one hand, the whole idea behind introducing Lua API in sysbench was to let people create their own custom benchmarks easily. And even though I am happy to see people and companies actually using it to create or re-implement other benchmarks with sysbench, I’ve been reluctant to merge them into the sysbench source tree. The reasons are pretty simple: it increases maintenance efforts on my end. Once a third-party benchmark is merged, it becomes my responsibility to fix bugs found by users, document it, make sure it is covered by regression tests, make sure it is compatible with API changes and so on. As sysbench is still just my hobby project, I’d like to focus on providing a useful tool rather than maintaining an increasing amount of user-contributed content.

On the other hand, there are good reasons why users want to get their custom benchmarks merged into the sysbench source tree – it makes those scripts easily available to others and consequently, it makes benchmark results easily reproducible.

The solution is to create a central repository of sysbench-specific Lua modules implementing custom benchmarks or other useful extensions like custom stat reporters, and the libraries they depend on.

Luckily, Lua already has all infrastructure to implement that, so creating such a repository required relatively minor efforts on my end. It’s called LuaRocks. So SysbencRocks is just a custom LuaRocks repository. And even the website is based on the open source code powering

The example module

SysbenchRocks is expectably empty at this moment. The only available module is example which is a generously commented simple benchmark explaining all the basic concepts of sysbench Lua API. I’m going to expand it with more API calls in the future.

The example module also includes a rockspec which is the only extra file that you have to create, if you want to publish your module on SysbenchRocks. The source code can be found at

Integrating LuaRocks into sysbench itself

While LuaRocks provides robust infrastructure and tooling (yay, open source!) for creating, publishing and installing custom sysbench modules, still users are required to perform certain steps to install and configure LuaRocks itself. To simplify this even further, I’m going to integrate LuaRocks into sysbench in the next major release. So searching, installing and using modules is going to be as simple as:

sysbench rocks search my_cool_benchmark
sysbench rocks install my_cool_benchmark
sysbench my_cool_benchmark run

Stay tuned!


It is also my pleasure to give credits to Hisham Muhammad for his awesome work on creating and maintaining LuaRocks, and to Leaf Corcoran for his awesome work on creating and maintaining the code powering the website. I would never get around to creating all SysbenchRocks infrastructure from scratch.