如何在同一台机器上运行多个客户端接口的 iperf3 吞吐量测试?

如何在同一台机器上运行多个客户端接口的 iperf3 吞吐量测试?

我正在尝试从一台具有多个以太网接口的机器到另一台具有相同数量以太网接口的机器运行吞吐量压力测试。例如

machine1.ethA.192.168.1.1 <-> 192.168.1.255.ethA.machine2
machine1.ethB.192.168.1.2 <-> 192.168.1.254.ethB.machine2
machine1.ethC.192.168.1.3 <-> 192.168.1.253.ethC.machine2

我最初的希望是在机器 2 上启动单个 iperf3 服务器,然后在机器 1 上启动三个 iperf3 客户端,用法类似于:

启动服务器。

machine2 $ iperf3 --json --server --daemon --one-off

启动客户端。

machine1 $ iperf3 --json --no-delay --client 192.168.1.255 --bind 192.168.1.1 --interval 0 --parallel 1 --time 30 > /tmp/client_a.log &
machine1 $ iperf3 --json --no-delay --client 192.168.1.254 --bind 192.168.1.2 --interval 0 --parallel 1 --time 30 > /tmp/client_b.log &
machine1 $ iperf3 --json --no-delay --client 192.168.1.253 --bind 192.168.1.3 --interval 0 --parallel 1 --time 30 > /tmp/client_c.log &

答案1

您可以通过 ing 缩小范围并运行多个实例bind

# Start multiple instances of the server.
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.255
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.254
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.253
# Start multiple instances of the client.
machine1 $ iperf3 --json --no-delay --client 192.168.1.255 --bind 192.168.1.1 --interval 0 --parallel 1 --time 30 &
machine1 $ iperf3 --json --no-delay --client 192.168.1.254 --bind 192.168.1.2 --interval 0 --parallel 1 --time 30 &
machine1 $ iperf3 --json --no-delay --client 192.168.1.253 --bind 192.168.1.3 --interval 0 --parallel 1 --time 30 &

如果你不缩小范围,你就会失败"error - the server is busy running a test. try again later"

相关内容