After you have installed your cluster you may want to bench it quickly to see that everything is working.
Here is an example how to run sysbench from the ClusterControl server, but of course using one of the nodes in the actual Cluster.
On the ClusterControl server do:
Centos/Redhat:
rpm -Uvh --force http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install sysbench
Debian/Ubuntu:
apt-get install sysbench
E.g, we have one MySQL Server on 10.0.1.10
mysql -ucmon -p -h10.0.1.10 -e "create database sbtest"
Prepare the dataset (create a table and insert 1000000 records), don't forget to change --mysql-password and --mysql-host:
sysbench --test=oltp --num-threads=16 --max-requests=10000 --db-driver=mysql --mysql-host=10.0.1.10 \
--mysql-user=cmon --mysql-password=cmon --oltp-table-size=1000000 --mysql-engine-trx=yes \
--oltp-reconnect-mode=transaction --mysql-table-engine=innodb --max-requests=1000000 prepare
Run with 16 threads, don't forget to change --mysql-password and --mysql-host (please note that sysbench does not have transaction retries):
sysbench --test=oltp --num-threads=16 --max-requests=10000 --db-driver=mysql --mysql-host=10.0.1.10 \
--mysql-user=cmon --mysql-password=cmon --oltp-table-size=1000000 --mysql-engine-trx=yes \
--oltp-reconnect-mode=transaction --mysql-table-engine=innodb --max-requests=1000000 run
MySQL Cluster users shoud set
--mysql-table-engine=ndbcluster
Comments
0 comments
Please sign in to leave a comment.