内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
10_network
»
05 KVM Multi-Queue
トレース:
01_linux:10_network:05_multi_queue
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 05 KVM Multi-Queue ====== KVMのデフォルトだと、並列パケット処理できなくてUDPで大量のアクセスが来た場合、 1つのCPUが100%に張り付いて処理できなくなる。 [[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/virtualization_tuning_and_optimization_guide/sect-virtualization_tuning_optimization_guide-networking-multi-queue_virtio-net]] ===== xml修正 ===== <color #ed1c24><driver name='vhost' queues='N'/></color> この部分追加 <code> <interface type='network'> <source network='default'/> <model type='virtio'/> <driver name='vhost' queues='N'/> </interface> </code> ===== VM再起動 ===== xml修正後は、VMの停止・起動が必要 virsh shutdown [vm] virsh start [vm] ===== VM再起動後 ===== VM内で、NICのマルチキューサポートを有効化 ethtool -L eth0 combined M ※KVM側で、ちゃんと対応した後で無いとエラーなります。 ==== KVM側で設定してない場合のエラー ==== <code> # ethtool -L eth0 combined 2 Cannot set device channel parameters: Invalid argument </code> ===== 確認 ===== 動作検証はiperf3とhtopコマンドで見ると分かりやすい ==== ethtoolで確認 ==== ethtool -L eth0 combined 2とした場合、下記のようになっているはず。 <code> # ethtool -l eth0 Channel parameters for ens3: Pre-set maximums: RX: 0 TX: 0 Other: 0 Combined: 2 Current hardware settings: RX: 0 TX: 0 Other: 0 Combined: 2 </code> <code> # ls /sys/class/net/eth0/queues/ rx-0 rx-1 tx-0 tx-1 </code> ==== VM側 ==== # iperf3 -s ==== クライアント側 ==== # iperf3 -c 10.10.102.10 -P 4 -t 100 -b 1G -u === top/htopで確認 === こんな感じでsoft割り込み(si)がバラけてくれる <code> # top top - 13:26:49 up 2:07, 2 users, load average: 0.47, 0.33, 0.26 Tasks: 124 total, 2 running, 122 sleeping, 0 stopped, 0 zombie %Cpu0 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 0.0 us, 1.4 sy, 0.0 ni, 82.7 id, 0.0 wa, 0.0 hi, 15.9 si, 0.0 st %Cpu2 : 3.4 us, 19.0 sy, 0.0 ni, 15.6 id, 0.0 wa, 0.0 hi, 62.0 si, 0.0 st %Cpu3 : 2.2 us, 12.9 sy, 0.0 ni, 62.9 id, 0.0 wa, 0.0 hi, 21.9 si, 0.0 st </code> === interruputsで確認 === <code> # cat /proc/interrupts | grep virtio0-input 27: 14371000 19775189 0 0 PCI-MSI-edge virtio0-input.0 29: 9 0 293 41440575 PCI-MSI-edge virtio0-input.1 31: 7669896 3004 8222898 858360 PCI-MSI-edge virtio0-input.2 33: 3929884 0 22509786 0 PCI-MSI-edge virtio0-input.3 </code> {{tag>KVM network queue}}
01_linux/10_network/05_multi_queue.txt
· 最終更新: 2022/06/11 00:26 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ