Check the bandwidth in linux

Source: Internet
Author: User
Imagine company A has A storage server named ginger and mounts NFS through A client node named beckham. Company A determines they need to get more bandwidth from ginger, because there are A large number of nodes that need NFS to mount the shared file system of ginger... information & n
Imagine company A has A storage server named ginger and mounts NFS through A client node named beckham. Company A determined they needed to get more bandwidth from ginger because there were A large number of nodes that needed NFS to mount the shared file system of ginger. The most common and cheapest way to do this is to combine two gibit Ethernet NICs. This is the cheapest because you usually have an additional available NIC and an additional port. Therefore, this method is used. But now the question is: how much bandwidth does it need? The theoretical limit of gibit Ethernet is 128 MBit/s. Where does this number come from? Look at these calculations: 1 Gb = 1024 Mb; 1024 Mb/8 = 128 MB; "B" = "bits, "," B "=" bytes ", but what do you actually see? is there any good measurement method? I recommend iperf. You can use the following method to obtain iperf: # wget http://dast.nlanr.net/Projects/Iperf2.0/iperf-2.0.2.tar.gz You need to install the tool on a shared file system that is visible to ginger and beckham, or compile and install the tool on two nodes. I will compile it in the home directory of bob user, which is visible to both nodes: tar zxvf iperf * gz cd iperf-2.0.2. /configure-prefix =/home/bob/perf make install on ginger, run: #/home/bob/perf/bin/iperf-s-f M this machine will be used as a server and output execution speed in MBit/s. On the beckham node, run: #/home/bob/perf/bin/iperf-c ginger-P 4-f M-w 256 k-t 60 the results on both screens indicate the speed. On a common server using the gibit adapter, the speed may be approximately 112 MBit/s. This is a common bandwidth in the TCP stack and physical cable. By connecting two servers in an end-to-end manner, each server uses two connected Ethernet cards, and I get a bandwidth of about 220 MBit/s. In fact, the NFS displayed on the connected network is about 150-160MBit/s. This still indicates that the bandwidth can achieve the expected effect. If a smaller value is displayed, check whether there is a problem. I recently encountered a situation where I connected two NICs using different drivers by connecting the driver. This results in very low performance. the bandwidth is about 20 MBit/s, which is smaller than the bandwidth when the Ethernet card is not connected!
Author: yingbin920
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.