ここでは、以下の環境でベンチマークを行います。
■環境

mail1.comがmail2.comに登録されている100メールアカウント宛にメールを送信します。
但し、メールサイズを固定して負荷をかけます。
「MStone」のデフォルトでは、1k、5k、17kのメッセージがランダムで送信されています。
「MStone」送信の設定は、以下URLの(2)を参照して下さい。
http://www.kurobuti.com/linux_server/?page_id=678
(1)送信するメッセージを作成する。
送信するメッセージの文字列はなんでもいいです。
まず、「MStone」のテストメッセージが保存されているディレクトリに移動します。
[root@mail1 ~]# cd /usr/local/mstone/data/
次に、文字列だけのテストメッセージを作成します。
[root@mail1 data]# vi messe.sh #!/bin/sh for (( i = 1; i <= 10000; i++ )) { echo -n "ababababa" >> en-.msg } [root@mail1 data]# ./messe.sh [root@mail1 data]# ls ← # テストメッセージが作成されているか確認 en-.msg [root@mail1 data]# du -h en-.msg ← # 作成したファイルの容量を確認 92K en-.msg [root@mail1 data]# mv en-.msg en-92k.msg ← # 分かりやすくファイルをリネーム(ファイルサイズが92k)
(2)作成したテストメッセージを「MStone」で送信できるように設定します。
[root@mail1 data]# cd /usr/local/mstone/conf/ [root@mail1 conf]# cp smtp1k.wld smtp92k.wld ← # 適当なsmtpメッセージのファイルをコピーする [root@mail1 conf]# vi smtp92k.wld # MailStone workload configuration file. See sample.wld for detailed usage # Typical SMTP delivery with 1K message size and restricted accounts <SMTP> weight 100 file /usr/local/mstone/data/en-92k.msg ← # 作成したテストメッセージを絶対パスで指定する # uncomment this line to just deliver to a subset of addresses #numAddresses 200 # deliver each message to more than 1 address numRecips 1 numLoops 1 # number of messages to send per login </SMTP>
次に、テストメッセージを送信する設定の本体である「smtp.wld」を編集します。
[root@mail1 conf]# vi smtp.wld # MailStone workload configuration file. See sample.wld for detailed usage # Deliver mail using SMTP # This can measure delivery rates for a specified message type. # This also fills the store for POP or IMAP tests <includeOnce conf/general.wld> <CONFIG> # test specific config title SMTP message deliveries clientCount 20 </CONFIG> # if we include more than one, we get a distribution of all sizes #<include conf/smtp1k.wld> ← # コメントアウト #<include conf/smtp5k.wld> ← # コメントアウト #<include conf/smtp17k.wld> ← # コメントアウト <include conf/smtp92k.wld> ← # 追加
(3)「MStone」を実行する。
[root@mail1 mstone]# ./mstone smtp -t 60s -l 100 Mstone version 4.9.4 Copyright (c) Netscape Communications Corp. 1997-2000 Starting time: Sun May 23 01:58:26 2010 Running pretest on localhost (results/20100523.0158/localhost-log-preifconfig.txt) Running monitor on localhost (results/20100523.0158/localhost-log-vmstat.txt) Starting clients (errors logged to results/20100523.0158/stderr) Starting 1 x 100 on localhost Rampup time: 20 seconds. Test duration: 60 seconds. Clients: 100 Index of runs: file:///usr/local/mstone/results/index.html Results (HTML): results/20100523.0158/results.html Updating... Sun May 23 01:59:12 2010: Reported duration 40sec (100 clients) Process 4766 exited (0). Shutting down monitors: 4765 Running posttest on localhost (results/20100523.0158/localhost-log-ifconfig.txt) Clients done: Sun May 23 01:59:47 2010 Collecting results Reported duration 62sec (100 clients) Generating results pages Processing done: Sun May 23 01:59:48 2010 Results (text): results/20100523.0158/results.txt Results (HTML): results/20100523.0158/results.html Index of runs: file:///usr/local/mstone/results/index.html Error log: results/20100523.0158/stderr (lines: 23) Mailmaster done: Sun May 23 01:59:48 2010
(4)結果(サンプル)
http://www.kurobuti.com/linux_server/result/smtp/20100523.0158/results.html