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/8229634 to your computer and use it in GitHub Desktop.
aws ec2 user data for mysql bench mark
#!/bin/bash
yum -y update
yum -y install mysql55-server
/etc/init.d/mysqld start
sleep 5
for i in key read write
do
echo ${i} >> /tmp/bench_result.csv
/usr/bin/mysqlslap --no-defaults --concurrency=50 --iterations=1 --number-int-cols=2 --number-char-cols=3 \
--auto-generate-sql --engine=innodb --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=key --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