Symptom
Network connection interrupted or poor network performance.
Other Terms
Network, SAP GUI, SAPGUI, RFC, ITS, bandwidth, throughput, latency, round trip time, RTT
Solution
To help diagnose the network or measure network metrics you can test the connection using SAP's NIPING program.
NIPING is delivered with SAP kernel releases as well as SAPROUTER. NIPING can be obtained from the Launchpad:
https://launchpad.support.sap.com/#/softwarecenter/support/index → By Category → Additional Components → SAPROUTER
You can use NIPING to analyze the network connection between any two machines running SAP software, for example between:
- Frontend PC and application server
- Two application servers, perhaps belonging to different SAP systems
- Application server and database server or live cache server
- RFC server or client programs and application server
The machines can be connected either by a local area network (LAN) or wide area network (WAN).
In contrast to the normal PING command, NIPING operates on the TCP socket layer, which is the same layer used by SAP application programs. Therefore, NIPING can be used to identify also errors related to the TCP and socket implementation on the platform.
Please fetch the latest version of NIPING from the service market place as described in SAP note 799428. If this is not possible for you, you can use the NIPING which is located in the executables directory on any SAP server.
How to use NIPING
Starting NIPING without arguments displays a short help message. Find a short exlanation of the most important options below:
First start the NIPING server on computer A (e.g., the Application Server) with the command line:
niping -s -I 0 (the last character is zero, not the letter O)
Then start the client (e.g. on the front-end machine) with the command:
niping -c -H <nipingsvr> [ -B <buffersize> -L <loops> -D <delay> ]
<nipingsvr> may also be the host name or the IP address of host A. The remaining arguments are optional.
<buffersize> (default 1000 bytes) determines the size of the data packets. Please test at least the values 500, 1000, 1400, 1500, 4000 and 10000. This test is especially important to find errors related to the maximum transmission unit (MTU). Please also refer to notes 26086, 107407, 67098 and 44803.
<loops> is the number of packets sent (default 10). To find spurious erors it may help to simulate high network load using 1000 loops or more. For a permanent test use a number of e.g. 1000000 loops.
If you test during productive hours and don't want to consume too much bandwidth you can set a <delay> between requests (<delay> is in milliseconds).
Attention: per default the niping server runs on port 3298, so make sure that no internal/external firewall rule prevents the tcp/ip connect to this port! The port for the niping server can be changed via the -S option. E.g.
niping -s -I 0 -S 5010 (port number change from 3298 to 5010)
Examples
1) Measuring network metrics (throughput and RTT)
Throughput is the number of bytes per second that an application can send through the network. Measured values will vary according to the actual load of the network. Round trip time (RTT) is the time for a small data packet to be transmitted from the sender to the receiver and back again to the sender. RTT is mainly influenced by network topology and equipment and normally cannot be improved significantly by increasing bandwidth.
1.1) Measuring throughput
niping -c -H <nipingsvr> -B 100000
On a gigabit network, we suggest to use the biggest possible block size
which is 8000000.
The use of large blocks reduces impact of network latency. After completion niping will report throughput as value tr2 in kB/s (kilobytes per second).
In general, you may not be able to obtain the actual maximum throughput of a network. On the other hand, you can expect to get the "realistic" results for SAP products as NIPING uses the same NI library for network communication.
Typical throughput values:
Gigabit Ethernet - 100000 KB/s
Fast Ethernet - 10000 KB/s
WLAN (IEEE 802.11g) - 5000 KB/s
DSL 1000 - 100 KB/s
ISDN - 7 KB/s
UMTS - up to 700 KB/s
GPRS - 6 KB/s
Consider that these are just example values to show the different dimensions. Do not use them to evaluate performance tests!
1.2) Measuring RTT
niping -c -H <nipingsvr> -B 1 -L 100
(The buffersize of 1 may cause an error in older versions of niping. If so please use niping -c -H <nipingsvr> -B 20 -L 100 instead)
Small blocks and 100 loops are used to measure the average RTT. The value av2 represents the RTT in ms (milliseconds)
Typical RTT values:
Fast Ethernet - <1 ms
WLAN (IEEE 802.11g) - 10 ms
Cable - 10 ms
DSL without Fastpath - 40 ms
ISDN - 200 ms
UMTS - 300 up to 400 ms
GPRS - 700 up to 1000 ms
Satellite - 1000ms
Consider that these are just example values to show the different dimensions. Do not use them to evaluate performance tests!
2) Long LAN stability test:
niping -c -H <nipingsvr> -B 10000 -D 100 -L 360000
This test will consume 100000 Bytes/second of bandwidth (about 10% of a 10 mbps Ethernet) and run for 10 hours.
You need the newest NIPING version for this test, please follow SAP note 799428 to get it.
3a) Long WAN test (stability):
niping -c -H <nipingsvr> -B 200 -D 1000 -L 36000
This test uses about 5% of an ISDN line of 64 kbps and also runs for 10 hours.
Interpreting NIPING's output: In this test, the times measured by NIPING correspond mostly to the network latency (round trip time - RTT). The throughput measurement has no meaning in this case.
3b) Long WAN test (idle timeouts):
niping -c -H <nipingsvr> -P -D 3600000
This test establishes a TCP connection and sends a test packet every hour (delay of 3600000ms). It runs for 10 hours. The goal is to see if the TCP connection is disrupted by some "idle timeout". Most firewalls apply such timeouts. But SAP applications make use of long lasting TCP connection and thus may be hit by such idle timeouts.
You need the newest NIPING version for this test, please follow SAP
note 799428 to get it.
4) Short throughput/stability test:
niping -c -H <nipingsvr> -B 1000000 -L 100
Tests connection with 100 MB of data as fast as possibly. On a 100 Mbps Ethernet this should take about 10 seconds. During the test, other applications may be impaired. On a slow WAN connection, reduce loops to 10 (-L 10).
Interpreting NIPING's output: This test uses large blocks of data. Therefore, it can be used to measure throughput available to NIPING. Check the output "tr2". It states the throughtput in kilo-byte per second measured from all packets except the fastest and the slowest one. Multiply this value by 10 to obtain an estimate of the line bandwidth in kilo-bit per second (kbps). Does this value differ by a large amount (at least a factor of two) from the one expected for the connection you are analyzing? This could be an indication of network problems: Either the line is overloaded, or there are other problems with the connection.
5) MTU test:
See related notes 155147 and 107407 for an explanation of this test (even if you are not analyzing a Windows system).
niping -c -H <nipingsvr> -B <nnn>
Vary <nnn> according to these values: 500, 1000, 1400, 1500, 4000, 10000 and 40000
Additional information
Note for Windows NT/2000: If client or server are under heavy load while you perform the measurement, you should start NIPING with high priority. To do this, start NIPING with the following command line:
start /b /wait /high niping <normal_NIPING_arguments>
Please test the TCP/IP communication between all concerned machines. Using the options described above, you can either do a long time connection test to find intermittent problems or do a short term stress test with large packets to find fundamental connection problems.
NIPING should not abort with an error message under any circumstances. An error is always indicated by a line starting with "*** ERROR ...".
Entries like "NiIRead: hdl 0 recv would block (errno=EAGAIN)" do not indicate an error!
If you can reproduce an error using NIPING then the problem is definitely related to the network layers, not to the application.
Information needed by SAP
If you need further assistance from SAP support, please start both client and server with the additional argument
-V 2 -T <tracefile>
Replace <tracefile> with an appropriate file name for trace output. Now send both trace files along with a description of what you did to produce the traces to SAP. (For example, attach the files to a problem message).