大网数据广告活动
服务器运维问答

Right way of measuring overlay network performance

· 52CE 我爱测

I am currently examining the performance (especially UDP throughput) of different Docker overlay networks. I do this by creating point-to-point connections between two hosts that are connected with a Docker overlay network and th…

问题原文

原帖链接 · arne.z · CC BY-SA 3.0

I am currently examining the performance (especially UDP throughput) of different Docker overlay networks. I do this by creating point-to-point connections between two hosts that are connected with a Docker overlay network and then run iperf inside the Docker containers to examine the throughput. I noticed that everytime I am running iperf as a client to send data to the other container that runs iperf as a server, the CPU usage of the client host reaches 100%. I got that result by running the following command I found on here:

top -bn1 | grep "Cpu(s)" | \
       sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | \
       awk '{print 100 - $1"%"}'

So, to me it seems that the limiting factor of my throughput tests is the CPU capacity of my host, since it runs at 100% and is not able to generate more traffic to saturate the network connection. I am wondering if this is an iperf specific issue so I wanted to run the same tests with a different tool but am not sure which alternative would be best. The hosts are running Ubuntu. For example, I found qperf, uperf and netpipe.

Also, more generally, I started to wonder what normally is the bottleneck for throughput performance. Isn't it always either the CPU capacity or the bandwidth of the link? Which are factors that are not directly related to the overlay networks.

Does that mean that the throughput of an application (or overlay network) just depends on how many CPU cycles it needs to transfer a certain amount of data and how it compresses it to fit it through the network (if that would be the bottleneck).

已采纳解答

原帖链接 · user5994461 · CC BY-SA 3.0

UDP is both CPU and bandwidth bound. It sends packets without guaranteeing that they are sent, transmitted nor received.

  • If the sender CPU is too busy, the packet is never sent.
  • If the bandwidth can't keep up, packets are dropped in transit.
  • If the receiver CPU is too busy or not ready to process incoming network data, it's lost.
  • If the application doesn't extract packets from the OS (and process them) fast enough, they are lost.

Generally speaking, UDP performances are meaningless. Nothing prevents you to try to send 1 bazillion packets a second. That saturates the sender CPU and the network, while the receiver might not get much of anything.

If you really want to test UDP, that is a rather long topic that is worthy of a book. For starter, you need to monitor error rates and what data is actually sent/received.

You should test with TCP to measure the available bandwidth between hosts. iperf should be able to do that just fine.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。