super-smackでmysqlの負荷状況を
lVS経由でのDBアクセスの分散を検証するために、super-smackいれちゃった。
#super-smackインストール
yum install byacc
cd /tmp
wget http://vegan.net/tony/supersmack/super-smack-1.3.tar.gz
tar xvzf super-smack-1.3.tar.gz
cd super-smack-1.3
./configure --prefix=/usr/local/super-smack --with-mysql
make
make install
#テストデータの作成
cd /usr/local/super-smack
./gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d > /var/smack-data/words.dat
words.datをdbサーバの/tmpに転送
#config?の作成
cp /tmp/super-smack-1.3/smacks/select-key.smack /usr/local/super-smack/.
userとか、hostを変更すればいい
#db関連の設定
test DBに下記を作成
CREATE TABLE test.http_auth (
username char (255) not null primary key,
pass char (25),
uid integer,
gid integer);
権限系の
grant select,insert,update,delete on *.* to root@'%' identified by 'pass';
load data infile '/tmp/words.dat' into table test.http_auth fields terminated by ',';
#こんな感じで実行できる模様
# ./super-smack ../select-key.smack 10 100
Query Barrel Report for client smacker1
connect: max=3001ms min=3ms avg= 1502ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 2000 1 0 623.75
#super-smackインストール
yum install byacc
cd /tmp
wget http://vegan.net/tony/supersmack/super-smack-1.3.tar.gz
tar xvzf super-smack-1.3.tar.gz
cd super-smack-1.3
./configure --prefix=/usr/local/super-smack --with-mysql
make
make install
#テストデータの作成
cd /usr/local/super-smack
./gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d > /var/smack-data/words.dat
words.datをdbサーバの/tmpに転送
#config?の作成
cp /tmp/super-smack-1.3/smacks/select-key.smack /usr/local/super-smack/.
userとか、hostを変更すればいい
#db関連の設定
test DBに下記を作成
CREATE TABLE test.http_auth (
username char (255) not null primary key,
pass char (25),
uid integer,
gid integer);
権限系の
grant select,insert,update,delete on *.* to root@'%' identified by 'pass';
load data infile '/tmp/words.dat' into table test.http_auth fields terminated by ',';
#こんな感じで実行できる模様
# ./super-smack ../select-key.smack 10 100
Query Barrel Report for client smacker1
connect: max=3001ms min=3ms avg= 1502ms from 10 clients
Query_type num_queries max_time min_time q_per_s
select_index 2000 1 0 623.75
- 2011.06.21 Tuesday
- -
- 20:30
- comments(2)
- trackbacks(0)
- -
- -
- by orz