[![Latest Release][release-badge]][release-url]
[![Build Status][travis-badge]][travis-url]
[![Debian Packages][deb-badge]][deb-url]
[![RPM Packages][rpm-badge]][rpm-url]
[![Coverage Status][coveralls-badge]][coveralls-url]
[![License][license-badge]][license-url]
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
**Table of Contents**
- [sysbench](#sysbench)
- [Features](#features)
- [Installing from Binary Packages](#installing-from-binary-packages)
- [Linux](#linux)
- [macOS](#macos)
- [Windows](#windows)
- [Building and Installing From Source](#building-and-installing-from-source)
- [Build Requirements](#build-requirements)
- [Windows](#windows)
- [Debian/Ubuntu](#debianubuntu)
- [RHEL/CentOS](#rhelcentos)
- [Fedora](#fedora)
- [macOS](#macos)
- [Build and Install](#build-and-install)
- [Usage](#usage)
- [General Syntax](#general-syntax)
- [General Command Line Options](#general-command-line-options)
- [Versioning](#versioning)
<!-- markdown-toc end -->
# 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](https://packagecloud.io). 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 <https://packagecloud.io/akopytov/sysbench/install>.
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
```
## 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
using
[Windows Subsystem for Linux available in Windows 10](https://msdn.microsoft.com/en-us/commandline/wsl/about).
After installing WSL and getting into he bash prompt on Windows
following Debian/Ubuntu installation instructions is
sufficient. Alternatively, one can use WSL to build and install sysbench
from source, or use an older sysbench release to build a native binary.
# Building and Installing From Source
It is recommended to install sysbench from the official binary
packages as described in
[Installing from Binary Packages](#installing-from-binary-packages). Below
are instruction for cases when you want to use sysbench on an
architecture for which no binary packages are available.
## Build Requirements
### Windows
As of sysbench 1.0 support for native Windows builds was
dropped. It may be re-introduced in later versions. Currently, the
recommended way to build sysbench on Windows is using
[Windows Subsystem for Linux available in Windows 10](https://msdn.microsoft.com/en-us/commandline/wsl/about).
After installing WSL and getting into bash prompt on Windows, following
Debian/Ubuntu build instructions is sufficient. Alternatively, one can
build and use an older 0.5 release on Windows.
### Debian/Ubuntu
``` shell
apt -y install make automake libtool pkg-config libaio-dev
# For MySQL support
apt -y install libmysqlclient-dev libssl-dev
# For PostgreSQL support
apt -y install libpq-dev
```
### RHEL/CentOS
``` shell
yum -y install make automake libtool pkgconfig libaio-devel
# For MySQL support, replace with mysql-devel on RHEL/CentOS 5
yum -y install mariadb-devel openssl-devel
# For PostgreSQL support
yum -y install postgresql-devel
```
### Fedora
``` shell
dnf -y install make automake libtool pkgconfig libaio-devel
# For MySQL support
dnf -y install mariadb-devel openssl-devel
# For PostgreSQL support
dnf -y install postgresql-devel
```
### macOS
Assuming you have Xcode (or Xcode Commane Line Tools) and Homebrew installed:
``` shell
brew install automake libtool openssl pkg-config
# For MySQL support
brew install mysql
# For PostgreSQL support
brew install postgresql
# openssl is not linked by Homebrew, this is to avoid "ld: library not found for -lssl"
export LDFLAGS=-L/usr/local/opt/openssl/lib
```
## Build and Install
``` shell
./autogen.sh
# Add --with-pgsql to build with PostgreSQL support
./configure
make -j
make install
```
The above will build sysbench with MySQL support by default. If you have
MySQL headers and libraries in non-standard locations (and no
`mysql_config` can be found in the `PATH`), you can specify them
explicitly with `--with-mysql-includes` and `--with-mysql-libs` options
to `./configure`.
To compile sysbench without MySQL support, use `--without-mysql`. If no
database drivers are available database-related scripts will not work,
but other benchmarks will be functional.
See [README-Oracle.md](README-Oracle.md) for instructions on building
with Oracle client libraries.
# Usage
## General Syntax
The general command line syntax for sysbench is:
sysbench [options]... [testname] [command]
- *testname* is an optional name of a built-in test (e.g. `fileio`,
`memory`, `cpu`, etc.), or a name of one of the bundled Lua scripts
(e.g. `oltp_read_only`), or a *path* to a custom Lua script. If no
test name is specified on the command line (and thus, there is no
*command* too, as in that case it would be parsed as a *testname*), or
the test name is a dash ("`-`"), then sysbench expects a Lua script to
execute on its standard input.
- *command* is an optional argument that will be passed by sysbench to
the built-in test or script specified with *testname*. *command*
defines the *action* that must be performed by the test. The list of
available commands depends on a particular test. Some tests also
implement their own custom commands.
Below is a description of typical test commands and their purpose:
+ `prepare`: performs preparative actions for those tests which need
them, e.g. creating the necessary files on disk for the `fileio`
test, or filling the test database for database benchmarks.
+ `run`: runs the actual test specified with the *testname*
argument. This command is provided by all tests.
+ `cleanup`: removes temporary data after the test run in those
tests which create one.
+ `help`: displays usage information for the test specifi
没有合适的资源?快使用搜索试试~ 我知道了~
sysbench-1.0.16
共952个文件
c:238个
h:193个
t:65个
需积分: 9 0 下载量 18 浏览量
2022-08-13
21:04:04
上传
评论
收藏 2.19MB ZIP 举报
温馨提示
sysbench-1.0.16
资源详情
资源评论
资源推荐
收起资源包目录
sysbench-1.0.16 (952个子文件)
luajit.1 2KB
ck.build.aarch64 1B
configure.ac 14KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 2KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 1KB
Makefile.am 953B
Makefile.am 931B
Makefile.am 929B
Makefile.am 926B
Makefile.am 926B
Makefile.am 925B
Makefile.am 923B
Makefile.am 921B
Makefile.am 911B
Makefile.am 864B
Makefile.am 842B
Makefile.am 826B
Makefile.am 633B
ck.build.arm 18B
msvcbuild.bat 4KB
ps4build.bat 4KB
xb1build.bat 3KB
xedkbuild.bat 3KB
psvitabuild.bat 3KB
minilua.c 170KB
lj_record.c 85KB
lj_parse.c 78KB
lj_asm.c 70KB
lj_opt_fold.c 68KB
lj_crecord.c 58KB
lj_cparse.c 56KB
sb_fileio.c 50KB
lj_alloc.c 41KB
sysbench.c 41KB
lj_ffrecord.c 38KB
sb_lua.c 37KB
ck_rhs.c 36KB
lj_ccall.c 34KB
lj_opt_mem.c 31KB
lj_api.c 29KB
lj_snap.c 28KB
lj_opt_split.c 26KB
drv_oracle.c 26KB
drv_mysql.c 26KB
lj_gc.c 26KB
lj_trace.c 26KB
lj_opt_narrow.c 25KB
lj_err.c 25KB
ck_ht.c 25KB
db_driver.c 24KB
lj_cconv.c 24KB
lib_ffi.c 23KB
lj_gdbjit.c 22KB
lj_ccallback.c 21KB
ck_hs.c 21KB
lib_jit.c 20KB
lj_strfmt_num.c 20KB
lj_debug.c 19KB
lib_string.c 19KB
lib_package.c 18KB
lj_tab.c 18KB
drv_pgsql.c 18KB
drv_drizzle.c 18KB
lj_ctype.c 18KB
ck_epoch.c 16KB
lj_dispatch.c 16KB
lj_strscan.c 16KB
lib_base.c 16KB
drv_attachsql.c 16KB
lj_opt_loop.c 15KB
sb_options.c 15KB
lj_meta.c 15KB
luajit.c 14KB
parallel_bytestring.c 13KB
parallel_bytestring.c 13KB
lj_lex.c 13KB
lib_io.c 13KB
lj_strfmt.c 13KB
parallel_bytestring.c 13KB
buildvm.c 13KB
lj_bcread.c 13KB
lj_ir.c 13KB
parallel_direct.c 13KB
lj_carith.c 12KB
sb_memory.c 12KB
buildvm_peobj.c 12KB
buildvm_lib.c 12KB
sb_logger.c 11KB
lj_clib.c 10KB
ck_ring_mpmc.c 10KB
validate.c 10KB
validate.c 10KB
lj_bcwrite.c 10KB
lj_mcode.c 10KB
共 952 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
renren-100
- 粉丝: 22
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MT2301ACTR-VB一款SOT23封装P-Channel场效应MOS管
- Vue 3 开发PC端实战从零到上线.docx
- Unity 资源插件之 Environment Weather Effect
- sap-me-products-how-to-guide-en.pdf
- sap-me-production-tracking-how-to-guide-en.pdf
- sap-me-production-lines-how-to-guide-en.pdf
- 路斯特伺服操作手册,应用手册 v1.00
- sap-me-process-workflow-how-to-guide-en.pdf
- sap-me-printing-how-to-guide-en.pdf
- sap-me-pod-how-to-guide-en.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0