Oracle - NETPERF
NETPERF is an open-source and free tool to do a pressure test for the network, especially for interconnect networks of RAC. Normally, we need to do this before we install a new RAC.
We can get it from Github: https://github.com/HewlettPackard/netperf
Compile & Install:
./autogen.sh ./configure make make install
Before we do testing, we should start netserver on another side, for here, it is running on the box database02
[root@database02 netperf]# netserver [root@database02 netperf]# ps -ef|grep netserver root 20948 1 0 15:29 ? 00:00:00 netserver root 21871 20308 0 16:46 pts/0 00:00:00 grep --color=auto netserver
By then, we do test on the box database01
By default, netperf do the test of TCP throughput, it is the same with -t TCP_STREAM
[root@database01 ~]# netperf -H 83.16.16.42 -l 10 -f M -c -C MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 83.16.16.42 () port 0 AF_INET Recv Send Send Utilization Service Demand Socket Socket Message Elapsed Send Recv Send Recv Size Size Size Time Throughput local remote local remote bytes bytes bytes secs. MBytes /s % S % S us/KB us/KB 87380 16384 16384 10.03 99.21 10.92 40.86 4.299 16.089
UDP throughput testing
[root@database01 ~]# netperf -H 83.16.16.42 -l 10 -f M -c -C -t UDP_STREAM MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 83.16.16.42 () port 0 AF_INET Socket Message Elapsed Messages CPU Service Size Size Time Okay Errors Throughput Util Demand bytes bytes secs # # MBytes/sec % SS us/KB 262144 65507 10.00 11298 0 70.6 45.13 24.978 262144 10.00 11283 70.5 14.36 7.949
TCP Request / Response Test
[root@database01 ~]# netperf -H 83.16.16.42 -l 10 -c -C -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 83.16.16.42 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem Send Recv Size Size Time Rate local remote local remote bytes bytes bytes bytes secs. per sec % S % S us/Tr us/Tr 16384 87380 1 1 10.00 1655.86 7.92 10.31 191.222 249.143 16384 87380
UDP Request / Response Test
[root@database01 ~]# netperf -H 83.16.16.42 -l 10 -c -C -t TCP_RR MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 83.16.16.42 () port 0 AF_INET : first burst 0 Local /Remote Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem Send Recv Size Size Time Rate local remote local remote bytes bytes bytes bytes secs. per sec % S % S us/Tr us/Tr 16384 87380 1 1 10.00 1655.86 7.92 10.31 191.222 249.143 16384 87380
When we do testing, we can use ifstat for monitoring
[root@database01 ~]# watch -n 1 ifstat net0 Every 10.0s: ifstat net0 Mon Dec 3 16:15:50 2018 #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate net0 682146 0 20640 0 103M 0 136K 0 0 0 0 0 0 0 0 0