58
中電雲集
怎樣測試機房的速度和帶寬以及影響服務器訪問速度的因素
一、如何測試機房的速度和帶寬?
目前國內IDC市場發展迅速,各類虛擬IDC運營商也象雨後春筍般冒了出來,不管大的小的IDC都吹噓自己的帶寬怎麼怎麼好,速度如何如何的快,其實其中有很多的誤區。
我們先來看看如何正確的測試一個機房的速度。
第一個辦法也是最好的辦法,PING值:
目標IP,或者域名都可以,舉例 https://www.pengpan.cn61.164.140.68
開始菜單 -> 運行 -> 輸入CMD -> 在DOS界麵輸入 “ping 61.164.140.68 -t” 或者 ”ping www.pengpan.cn -t ”
注意如果沒有 -t 那麼ping值隻有4個不具備代表性,-t參數就是讓ping一直接續下去,知道你 手工 ctrl C 停止。
杭州電信ADSL ping的結果:
C:\Documents and Settings\Administrator>ping www.pengpan.cn -t 【輸入的命令】
Pinging www.pengpan.cn[61.164.140.68] with 32 bytes of data:
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52 【一條ping記錄 主要看TIME的值】
Reply from61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
…………………………..(當中刪除不少)
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=8ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=8ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from 61.164.140.68: bytes=32 time=9ms TTL=52
Reply from61.164.140.68 bytes=32 time=8ms TTL=52
Ping statistics for 61.164.140.68:
Packets: Sent = 43, Received = 43, Lost = 0 (0% loss), 【合計發包43個,收到43個,丟包0 對保率 0】
Approximate round trip times in milli-seconds:
Minimum = 8ms, Maximum = 9ms, Average = 8ms 【最小值8毫秒,最大值9毫秒,平均8毫秒】
Control-C
^C
移動寬帶 ping的結果
C:\Documents and Settings\Administrator>ping www.pengpan.cn -t 【輸入的命令】
Pinging www.pengpan.cn [61.164.140.68] with 32 bytes of data:
Reply from 61.164.140.68: bytes=32 time=4ms TTL=51 【一條ping記錄 主要看TIME的值】
Reply from 61.164.140.68: bytes=32 time=20ms TTL=51
…………………………..(當中刪除不少)
Reply from 61.164.140.68: bytes=32 time=4ms TTL=51
Reply from 61.164.140.68: bytes=32 time=4ms TTL=51
Reply from 61.164.140.68: bytes=32 time=12ms TTL=51
Reply from 61.164.140.68: bytes=32 time=4ms TTL=51
Reply from 61.164.140.68 bytes=32 time=4ms TTL=51
Ping statistics for 61.164.140.68:
Packets: Sent = 26, Received = 26, Lost = 0 (0% loss), 【合計發包26個,收到26個,丟包0 對保率 0】
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 79ms, Average = 9ms【最小值4毫秒,最大值79毫秒,平均9毫秒】
Control-C
^C
看到這種數據我們如何來分析這個結果,首先盡量使用電信的ADSL來測試,因為這個是最具有代表性的,而聯通,鐵通,移動的寬帶由於各種互聯互通的原因ping值肯定不準確或者沒有辦法作為評判的數據,但是可以作為一個參考的依據。
一個速度好的機房,首先丟包率不能超過1%,最好是1000個ping 沒有一個丟包,這種是最理想的,但是這個不是絕對值,隻要低於1%的都屬於不錯的路由情況了。
其次ping值要小,同城的電信adsl ping 平均值絕對不能超過20,一般在10,跨省的adsl ping平均值應該在20-40 屬於正常。
第三點是ping值要均勻,這個我們可以參看移動的ping值結果,盡管 最小的ping值隻有4,但是不時的有幾十,最大有79的出現,這個就是路由不穩定的表現,同樣的電信的adsl,盡管最小也有8,但是最大也隻有9,就說明電信的ADSL到www.pengpan.cn的路由情況更好,這個也是因為www.pengpan.cn是放在電信的機房的緣故。
測試的第二個辦法,測試路由 tracert router
這個是看看測試點到達目標服務器需要經過多少個路由器,並且可以根據經過的每個路由的毫秒數字看出慢在那個路由器,並通過ip nslookup 來查看這個ip屬於那個運營商的,甚至那個省市的運營商的,這樣就一目了然了。
舉例:
C:\Documents and Settings\Administrator>tracert www.pengpan.cn -d
Tracing route to www.pengpan.cn [61.164.140.68]
Trace complete.
二、影響服務器訪問速度的因素
1—服務器硬件配置(服務器類型、CPU、內存、硬盤速度、網卡速度)
2—服務器所在的環境和骨幹網
3—服務器在網內環境和速度
4—互連的速度
5—ChinaNET國際出口速率
6—訪問者的ISP與ChinaNET 之間的專線速率
7—訪問者的ISP向客戶端開放的端口接入速度
8—訪問者計算機配置、modem速率、電話線路質量問題等。
PS:ISP—Internet接入服務提供商
最後更新:2017-01-04 22:34:48