How to use iperf over mininet ? -- gnuplot


http://csie.nqu.edu.tw/smallko/sdn/iperf_mininet.htm


[Description]

   In this lab, I will show howto use iperf to do basic performance evaluation over mininet. Also, I will usesimple shell script to get the evaluation results and then use gnuplot to drawthe graph.

 

[Operations].

1. Create one switch and two hostsenvironment.

 

2. use xterm to open windows for h1 and h2

 

3. Basic TCP transmission evaluation.

3.1 Start the TCP server (-s) at h2 withport 5566 (-p). Also, monitor the results every one second (-i). Note: thedefault setting is using TCP.

 

3.2 Start the TCP client (-c) at h1. Also,set the transmission duration (-t) to 15 seconds. Note: after -c, you need tospecify the server ip address.

 

3.3. Results.

results at h1. (From 0~15 seconds, theaverage throughput is 14.2 Gbps)

 

results at h2. (The following figure showsthe throughput every second)

 

3.4 If we want to draw the throughputgraph, we need to do the evaluation again. But this time, we need to save theresult into a file. Then do some post-processing. After that, use gnuplot todraw the graph.

3.4.1 start the iperf server again. (use> to redirect the results to "result" file)

 

3.5. do the post-processing to get the datafor plotting. (| grep sec: reserve the line containing "sec"; head-15: from beginning, get the first 15 lines(1~15 seconds); tr - " ":using " " to replace "-";  awk '{print 4,8}: getthe 4th and 8th columns)

The final results: the first column istime, and the second column is throughput.

 

3.6 use gnuplot to draw the graph. (Installgnuplot if needed)

 

start gnuplot. [plot "new_result"title "tcp flow" with linespoints"] is draw the graph using datain new_result file.

 

 

 

save the graph into result.gif

 

exit the gnuplot program.

 

4. Basic UDP transmission evaluation.

4.1 Start the UDP (-u) server (-s) at h2with port 5566 (-p). Also, monitor the results every one second (-i).

 

4.2 Start the UDP (-u) client (-c) at h1.Also, set the transmission duration (-t) to 15 seconds. Note: after -c, youneed to specify the server ip address. Also, you can use -b to specify thesending rate.

 

4.3 Results.

 

4.4 use similar shell script to get thedata and draw the figure. (Please do it by yourself.)

 

Dr. Chih-Heng Ke

Department of Computer Scienceand Information Engineering, National Quemoy University, Kinmen, Taiwan

Email: smallko@gmail.com


posted @   张同光  阅读(123)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示