akopytov /sysbench

Scriptable database and system performance benchmark

★ 6,814⑂ 1,148👁 180⑃ 142● 423▤ 21
CCreated 2015-03-07
6,814
stars
+0+0+12
1,148
forks
180
watchers
142
prs
423
issues
21
releases
–
discussions

README

[![Latest Release][release-badge]][release-url]
[![Build Status][action-badge]][action-url]
[![Debian Packages][deb-badge]][deb-url]
[![RPM Packages][rpm-badge]][rpm-url]
[![Coverage Status][coveralls-badge]][coveralls-url]
[![License][license-badge]][license-url]


Table of Contents

- sysbench
    - Features
- Installing from Binary Packages
    - Linux
    - macOS
    - Windows
- Building and Installing From Source
    - Build Requirements
        - Windows
        - Debian/Ubuntu
        - RHEL/CentOS
        - Fedora
        - macOS
    - Build and Install
- Usage
    - General Syntax
    - General Command Line Options
    - Random Numbers Options
- Versioning



 sysbench

sysbench is a scriptable multi-threaded benchmark tool based on
LuaJIT. It is most frequently used for database benchmarks, but can also
be used to create arbitrarily complex workloads that do not involve a
database server.

sysbench comes with the following bundled benchmarks:

- oltp_.lua: a collection of OLTP-like database benchmarks
- fileio: a filesystem-level benchmark
- cpu: a simple CPU benchmark
- memory: a memory access benchmark
- threads: a thread-based scheduler benchmark
- mutex: a POSIX mutex benchmark

 Features

- extensive statistics about rate and latency is available, including
  latency percentiles and histograms;
- low overhead even with thousands of concurrent threads. sysbench is
  capable of generating and tracking hundreds of millions of events per
  second;
- new benchmarks can be easily created by implementing pre-defined hooks
  in user-provided Lua scripts;
- can be used as a general-purpose Lua interpreter as well, simply
  replace !/usr/bin/lua with !/usr/bin/sysbench in your script.

 Installing from Binary Packages

 Linux

The easiest way to download and install sysbench on Linux is using
binary package repositories hosted by
packagecloud. The repositories are
automatically updated on each sysbench release. Currently x86_64, i386
and aarch64 binaries are available.

Multiple methods to download and install sysbench packages are available and
described at .

Quick install instructions:

- Debian/Ubuntu
   shell
  curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash
  sudo apt -y install sysbench
  

- RHEL/CentOS:
   shell
  curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
  sudo yum -y install sysbench
  

- Fedora:
   shell
  curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash	
  sudo dnf -y install sysbench
  

- Arch Linux:
   shell
  sudo pacman -Suy sysbench
  

 macOS

On macOS, up-to-date sysbench packages are available from Homebrew:
shell
 Add --with-postgresql if you need PostgreSQL support
brew install sysbench


 Windows
As of sysbench 1.0 support for native Windows builds was dropped. It may
be re-introduced in later releases. Currently, the recommended way to
obtain sysbench on Windows is

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON