溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何實現(xiàn)CentOS下千兆網(wǎng)卡帶寬測試

發(fā)布時間:2021-09-24 14:19:14 來源:億速云 閱讀:126 作者:iii 欄目:系統(tǒng)運維

本篇內容介紹了“如何實現(xiàn)CentOS下千兆網(wǎng)卡帶寬測試”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!

iperf 是一個基于C/S模型的純帶寬測試軟件,可以測試網(wǎng)卡的吞吐量。

iperf的好處是純粹發(fā)包和接收,防止硬盤拖后腿,影響測試結果。

本文以千兆網(wǎng)卡Bcom 5720 進行測試,環(huán)境CentOS 6.4  x64

在兩臺機器上分別安裝iperf

yum  install iperf --enablerepo=epel

在其中一臺以服務端方式啟動,并開放防火墻5001端口

iperf -s -i 1 -w 448k

啟動結果如下:

Server listening on TCP port 5001

TCP window size:  448 KByte

在另一臺上,以客戶端方式連接到服務端,測試10分鐘

iperf -c 10.10.10.22 -i 1 -w 448k -t 600

此時,服務端會顯示如下信息

[  4] local 10.10.10.22 port 5001 connected with 10.10.10.11 port 56251

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0- 1.0 sec   112 MBytes   941 Mbits/sec

[  4]  1.0- 2.0 sec   112 MBytes   941 Mbits/sec

[  4]  2.0- 3.0 sec   112 MBytes   941 Mbits/sec

[  4]  3.0- 4.0 sec   112 MBytes   941 Mbits/sec

[  4]  4.0- 5.0 sec   112 MBytes   941 Mbits/sec

[  4]  5.0- 6.0 sec   112 MBytes   941 Mbits/sec

[  4]  6.0- 7.0 sec   112 MBytes   941 Mbits/sec

[  4]  7.0- 8.0 sec   112 MBytes   941 Mbits/sec

客戶端信息則是

  3] 46.0-47.0 sec    112 MBytes    942 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 47.0-48.0 sec    112 MBytes    941 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 48.0-49.0 sec    112 MBytes    942 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 49.0-50.0 sec    112 MBytes    941 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 50.0-51.0 sec    112 MBytes    942 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 51.0-52.0 sec    112 MBytes    941 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 52.0-53.0 sec    112 MBytes    941 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 53.0-54.0 sec    112 MBytes    942 Mbits/sec

[ ID] Interval       Transfer     Bandwidth

[  3] 54.0-55.0 sec    112 MBytes    941 Mbits/sec

以上信息顯示,當前網(wǎng)卡傳輸速度約為940Mbit/s,接近理論速度1G/s,下載速度112M/s,也接近理論速度125M/s,通過cacti 帶寬監(jiān)控,也顯示上述統(tǒng)計結果。

至此,千兆網(wǎng)卡驗明正身。

補充說明,影響帶寬的可能原因有很多:

1、交換機是百兆的,通信樞紐

2、千兆網(wǎng)卡工作在百兆模式,參與測試的機器任意一臺工作在百兆都不行

3、用真實的硬盤文件進行測試,硬盤速度拖后腿

“如何實現(xiàn)CentOS下千兆網(wǎng)卡帶寬測試”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關的知識可以關注億速云網(wǎng)站,小編將為大家輸出更多高質量的實用文章!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI