Setup :
#yum -y remove mariadb-libs
#yum install mysql-community-server -y
#yum install mysql-community-devel.x86_64
#service mysqld restart
#tar zxvf sysbench-0.4.12.14.tar.gz
#cd sysbench-0.4.12.14
#./autogen.sh
#./autogen.sh
#./configure --with-mysql
#make
#make install
-------------------------------------------------------------------------------
Running:
CPU benchmark
#sysbench --test=cpu --cpu-max-prime=20000 --max-time=120 run
Memory benchmark
#sysbench --test=memory --max-time=120 run
IO benchmark
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw prepare
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw run
Clean the test file
#sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw cleanup
MySQL benchmark
#vim /etc/my.cnf
add new line under [mysqld]
skip-grant-tables
# service mysqld restart
#mysql -u root -p
Input Aa123456
mysql>create database sbtest;
Execute in another terminal
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 prepare
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 run
Clean the test file
#sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-db=sbtest --mysql-user=root --mysql-password=Aa123456 cleanup
沒有留言:
張貼留言