0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

perfdhcpによるDHCPサーバの払い出し性能評価

Last updated at Posted at 2024-10-17

課題

学校では端末が一斉に起動されるため,DHCPサーバによるアドレス払い出しが間に合わず,端末に適切なIPアドレスが設定されない場合があります.
DHCPサーバの払い出し能力を確認するには,同様のシチュエーションでテストすればいいのですが,複数台同時起動するのも大変なので,ツールを使って負荷テストにより能力を求めてみます.

perfdhcp

iscのdhcpサーバ,keaに含まれるdhcpサーバのパフォーマンス測定ツール

インストール

Debianだとkea-adminパッケージに含まれているので,パッケージをインストールします.
sudo apt install kea-admin

測定

ip aを実行して,インターフェイス名を確認しておく.
sudo perfdhcp -4 -l インターフェイス名 -r 10 DHCPサーバのIP
でIPv4を使って指定したインターフェイスから指定したサーバへrate 10でテストする.rateを指定していないと,サーバの負荷が大きくなるので,様子をみながら大きくしていく.
適当な時間が過ぎたら,Ctrl-Cで止めるとレポートが表示される.一定の時間で止めたい場合は-p 10もオプションに追加とすると10秒で止まる.

Example

IPv4のDHCPサーバを測定する例

sudo perfdhcp -4 -xi -t 2 -r 5 -R 100 -n 100 -l wlp3s0 192.168.1.1

オプションの意味

  • -4 DHCPv4
  • -xi query/responseレートの表示
  • -t 2 レポートの表示間隔(秒)
  • -R 100 100デバイスによるrequestをシミュレート
  • -n 100 perfdhcpが行うリクエスト数
  • -r 5 5パケット/秒
  • -l wlp3s0 インターフェイス名
  • 192.168.1.1 DHCPサーバのIPアドレス

-n でリクエスト数を設定しているので,指定回数で終了する.-pでテスト時間を設定することも可能.リクエスト回数もしくはテスト時間を設定していないと,終了しないので,その場合はCtrl-Cで止める.

結果

-r 20での結果

Running: perfdhcp -4 -l wlp3s0 -r 20 -p 10 all
Scenario: basic.
Multi-thread mode enabled.
***Rate statistics***
Rate: 19.8994 4-way exchanges/second, expected rate: 20

***Malformed Packets***
Malformed packets: 0
***Statistics for: DISCOVER-OFFER***
sent packets: 199
received packets: 199
drops: 0
drops ratio: 0 %
orphans: 0
rejected leases: 0
non unique addresses: 0

min delay: 3.431 ms
avg delay: 4.509 ms
max delay: 7.590 ms
std deviation: 0.695 ms
collected packets: 0

***Statistics for: REQUEST-ACK***
sent packets: 199
received packets: 199
drops: 0
drops ratio: 0.000 %
orphans: 0
rejected leases: 0
non unique addresses: 0

min delay: 3.296 ms
avg delay: 4.655 ms
max delay: 21.791 ms
std deviation: 1.813 ms
collected packets: 0

-r 300での結果

Running: perfdhcp -4 -l wlp3s0 -r 300 -p 60 all
Scenario: basic.
Multi-thread mode enabled.
***Rate statistics***
Rate: 36.0498 4-way exchanges/second, expected rate: 300

***Malformed Packets***
Malformed packets: 0
***Statistics for: DISCOVER-OFFER***
sent packets: 17999
received packets: 6653
drops: 11346
drops ratio: 63.0368 %
orphans: 0
rejected leases: 0
non unique addresses: 0

min delay: 4.437 ms
avg delay: 64.997 ms
max delay: 187.634 ms
std deviation: 10.137 ms
collected packets: 9271

***Statistics for: REQUEST-ACK***
sent packets: 6653
received packets: 2163
drops: 4490
drops ratio: 67.488 %
orphans: 0
rejected leases: 0
non unique addresses: 0

min delay: 14.052 ms
avg delay: 64.587 ms
max delay: 180.496 ms
std deviation: 13.487 ms
collected packets: 1845

比較

rateを上げることで,払い出し能力が不足し,dropが増えている.

参考リンク

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?