Skip to content

Instantly share code, notes, and snippets.

@inokappa
Last active January 2, 2016 01:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save inokappa/8229621 to your computer and use it in GitHub Desktop.
aws ec2 user data for mysql cluster bench mark
#!/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