LoginSignup
4
3

More than 5 years have passed since last update.

MySQL5.6のsysbench検証

Last updated at Posted at 2013-02-20

MySQL5.6の性能があまりよくないらしい

Is MySQL 5.6 slower than MySQL 5.5 ?の記事では単純なsysbenchでは性能が落ちるようなので、確認する。

sysbenchのインストール

wget http://sourceforge.net/projects/sysbench/files/latest/download
tar zxvf sysbench-0.4.12.tar.gz 
cd sysbench-0.4.12
libtoolize --force --copy
aclocal
autoconf
touch NEWS
touch AUTHORS
automake
./configure
make
make install

MySQLのインストール

wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.10-1.linux_glibc2.5.x86_64.rpm/from/http://cdn.mysql.com/
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.10-1.linux_glibc2.5.x86_64.rpm/from/http://cdn.mysql.com/
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.10-1.linux_glibc2.5.x86_64.rpm/from/http://cdn.mysql.com/
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.10-1.linux_glibc2.5.x86_64.rpm/from/http://cdn.mysql.com/
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-compat-5.6.10-1.linux_glibc2.5.x86_64.rpm/from/http://cdn.mysql.com/
rpm -ivh /usr/local/src/MySQL*5.6.10*.rpm

MySQL-sharedがないとsysbenchが動かないので入れておく
インストールについては省略

データ作成

mysql>create database sbtest;
mysql>GRANT ALL ON *.* TO benchuser@"localhost" IDENTIFIED BY "benchuser";
#/usr/local/bin/sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=benchuser --mysql-password=benchuser prepare

負荷テスト実行

/usr/local/bin/sysbench  --test=oltp  --oltp-table-size=1000000 --num-threads=1 --max-requests=200000 --max-time=0 --oltp-test-mode=complex --mysql-user=benchuser --mysql-password=benchuser run
/usr/local/bin/sysbench  --test=oltp  --oltp-table-size=1000000 --num-threads=4 --max-requests=200000 --max-time=0 --oltp-test-mode=complex --mysql-user=benchuser --mysql-password=benchuser run
/usr/local/bin/sysbench  --test=oltp  --oltp-table-size=1000000 --num-threads=64 --max-requests=200000 --max-time=0 --oltp-test-mode=complex --mysql-user=benchuser --mysql-password=benchuser run

結果

同時接続数 MySQL5.6(tps) MySQL5.5(tps)
64 2729 2980
4 938 1099
1 292 341
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3