〇インストール方法
シェルから以下のコマンド実行します
echo "mariadb-server-10.0 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mariadb-server-10.0 mysql-server/root_password_again password root" | sudo debconf-set-selections
sudo apt-get -y install mariadb-server
sudo mysql -uroot -e "CREATE DATABASE sysbench DEFAULT CHARACTER SET utf8;"
sudo mysql -uroot -e "CREATE USER sysbench@localhost IDENTIFIED BY 'sysbench';"
sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON sysbench.* TO 'sysbench'@'localhost';"
sudo mysql -uroot -e "FLUSH PRIVILEGES;"
sudo apt-get -y install curl
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash
sudo apt-get -y install sysbench
〇CPUベンチマークの実行
sysbench --test=cpu run --num-threads=2
〇メモリベンチマークの実行
sysbench --test=memory run --num-threads=2
〇ファイルIOベンチマークの実行
sysbench --test=fileio run --file-test-mode=seqwr --num-threads=2
sysbench --test=fileio prepare --file-test-mode=rndwr --num-threads=2
sysbench --test=fileio run --file-test-mode=rndwr --num-threads=2
〇OLTPベンチマークの実行
sysbench --db-driver=mysql \
--mysql-user=sysbench \
--mysql-password=sysbench \
--mysql-port=3306 \
--mysql-db=sysbench \
--range_size=100 \
--table_size=10000 \
--tables=2 \
--threads=1 \
--events=0 \
--time=60 \
--rand-type=uniform /usr/share/sysbench/oltp_read_only.lua prepare
sysbench --db-driver=mysql \
--mysql-user=sysbench \
--mysql-password=sysbench \
--mysql-port=3306 \
--mysql-db=sysbench \
--range_size=100 \
--table_size=10000 \
--tables=2 \
--threads=1 \
--events=0 \
--time=60 \
--rand-type=uniform /usr/share/sysbench/oltp_read_only.lua run
0 件のコメント:
コメントを投稿