2012년 5월 26일 토요일

❑ sysbench 사용하기


###################For MYISAM(rows:10000)#######################
# sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=myisam --mysql-socket=/database/mysql/mysql.sock prepare

mysql> create table benchdb.sbtest10000_myisam as select * from test.sbtest;

# sysbench --test=oltp --db-driver=mysql --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=myisam --mysql-socket=/database/mysql/mysql.sock --oltp-read-only --oltp-test-mode=simple --num-threads=20 run

# sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=myisam --mysql-socket=/database/mysql/mysql.sock cleanup



###################For INNODB(rows:10000)#######################
# sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=innodb --mysql-socket=/database/mysql/mysql.sock prepare

mysql> create table benchdb.sbtest10000_myisam as select * from test.sbtest;

# sysbench --test=oltp --db-driver=mysql --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=innodb --mysql-socket=/database/mysql/mysql.sock --oltp-read-only --oltp-test-mode=simple --num-threads=20 run

# sysbench --test=oltp --db-driver=mysql --oltp-table-size=10000 --mysql-host=localhost --mysql-user=root --mysql-password=root --mysql-db=test --mysql-table-engine=innodb --mysql-socket=/database/mysql/mysql.sock cleanup



댓글 없음:

댓글 쓰기