aws ec2 user data for mysql cluster bench mark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /tmp/ | |
wget http://dev.mysql.com/get/Downloads/MySQL-Cluster-7.3/MySQL-Cluster-server-gpl-7.3.3-1.el6.x86_64.rpm | |
wget http://dev.mysql.com/get/Downloads/MySQL-Cluster-7.3/MySQL-Cluster-client-gpl-7.3.3-1.el6.x86_64.rpm | |
rpm -Uvh /tmp/MySQL-Cluster-* | |
/etc/init.d/mysql stop | |
echo "skip-grant-tables" >> /usr/my.cnf | |
/etc/init.d/mysql start | |
for i in key read write | |
do | |
echo ${i} >> /tmp/bench_result.csv | |
/usr/bin/mysqlslap --no-defaults --concurrency=50 --iterations=3 --number-int-cols=2 --number-char-cols=3 \ | |
--auto-generate-sql --engine=innodb --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=${i} --auto-generate-sql-write-number=1000 \ | |
--number-of-queries=100000 --host=localhost --port=3306 --user=root --csv=/tmp/bench_result.csv | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment