In actual O & M fault debugging, the performance of network equipment is often the focus of attention. Network performance problems are the most important factors that affect the overall system performance. Network performance can include two levels of indicators: current actual value and performance extreme value. The actual value refers to the network traffic and load during the system's actual operation or peak hours. The ultimate performance is the overall limit of the test network.
For Oracle databases, some important architecture modes, such as RAC, Dataguard, and Golden Gate, require reliable network structures. When a fault occurs, it is also frequently necessary to perform test and verification between network nodes. This article describes how to test the network bandwidth of Iperf to check the performance bottleneck of network devices.
Iperf is an open-source tool. its official website is http://iperf.fr /. Currently, Iperf supports TCP and UDP bandwidth tests. The operating system also covers mainstream operating systems such as Linux, Windows, and MacOS. For Oracle, TCP and UDP protocols have already covered the most common protocol types. Oracle RAC uses UDP protocol in the Internet private network (except for Windows), and TCP protocol for Internet data transmission access.
The following shows how to use Iperf in Linux.
1. Environment Configuration
The Iperf working mode is a typical CS mode. The working principle is to transmit network packets to the server through the client, so as to calculate the network situation.
First, download the Linux version of iperf from the official website. The Linux version is in the bz compressed package format. After uploading the package to the server, you need to decompress the package.
We prepare two servers for testing, Server 1 and Server 2.
The 1IP address of the server is 172.16.3.27, and the version is Linux kernel 2.6.32. Upload iperf to the corresponding directory and decompress it.
[Root @ TESTAUDDB ~] # Uname-r
2.6.32-131.0.15.el6.x86 _ 64
[Root @ TESTAUDDB ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 34: 40: B5: A1: 56: C0
Inet addr: 172.16.3.27 Bcast: 172.16.255.255 Mask: 255.255.255.0
Inet6 addr: fe80: 3640: b5ff: fea1: 56c0/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
[Root @ TESTAUDDB ~] # Cd/
[Root @ TESTAUDDB/] # mkdir iperf
[Root @ TESTAUDDB/] # ls-l | grep iperf
Drwxr-xr-x. 2 root 4096 Mar 21 08:30 iperf
Upload the software package and decompress it.
[Root @ TESTAUDDB iperf] # bzip2-d iperf64.bz2
[Root @ TESTAUDDB iperf] # chmod 755 iperf64
[Root @ TESTAUDDB iperf] # ls-l
Total 856
-Rwxr-xr-x. 1 root 876211 Mar 21 iperf64
The IP address of the second server is 172.16.3.28, which is also Linux 2.6.32.
[Root @ TESTAUDAPP ~] # Hostname
TESTAUDAPP
[Root @ TESTAUDAPP ~] # Uname-r
2.6.32-131.0.15.el6.x86 _ 64
Eth0 Link encap: Ethernet HWaddr 34: 40: B5: A1: 53: D8
Inet addr: 172.16.3.28 Bcast: 172.16.255.255 Mask: 255.255.255.0
Inet6 addr: fe80: 3640: b5ff: fea1: 53d8/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 3350494 errors: 0 dropped: 0 overruns: 0 frame: 0
Upload the iperf directory. decompress the package in the same way as Server 1. The process is omitted.
[Root @ TESTAUDAPP iperf] # ls-l
Total 856
-Rwxr-xr-x. 1 root 876211 Mar 21 iperf64
Note: As a host on the IPerf server, you 'd better disable the firewall program or enable port 5001.
[Root @ TESTAUDDB iperf] # service iptables stop
Iptables: Flushing firewall rules: [OK]
Iptables: Setting chains to policy ACCEPT: nat mangle filter [OK]
Iptables: Unloading modules: [OK]
2. Use IPerf to diagnose and test the TCP protocol.
We first perform a simple TCP network test. Start the Iperf program on the server (3.27) and start it in server mode.
(On 3.27)
[Root @ TESTAUDDB iperf] #./iperf64-s
---------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
-----------------------------------------------
On the client, start the program in client mode through parameter-c. The client parameter-c is the IP address of the Connected Server.
[Root @ TESTAUDAPP iperf] #./iperf64-c 172.16.3.27
----------------------------------------------
Client connecting to 172.16.3.27, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------
[3] local 172.16.3.28 port 64207 connected with 172.16.3.27 port 5001
[ID] Interval Transfer Bandwidth
[3] 0.0-10.0 sec 1.10 GBytes 943 Mbits/sec
The last line is the test result. Interval indicates the connection test time range, usually 10 s. Transfer indicates the total amount of data transmitted by the client and server during this period. The result Bandwidth is the network transmission rate, that is, the Bandwidth.
The experimental results show that the network bandwidth between the two servers is 943 Mbits/sec.
For more details, please continue to read the highlights on the next page: