Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 15 of 18

Digi One and PortServer TS Family User's Guide: Latency Tuning

Pages 115 to 118 of 140, from Digi One and PortServer TS Family User's Guide

The original document is the PDF (2.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Digi PortServer TS4

Page 115

What Is Latency?

L a t e n c y Tu n i n g

Chapter 11

This chapter discusses latency and a recommended process for defining and addressing latency issues in your network and application.

What Is Latency? Latency is the amount of time it takes a packet to travel from source to destination. Together, latency and bandwidth define the speed and capacity of a network. Several factors influence latency, including the traffic pattern and traffic generated by an application, the physical wiring for the network, the use of various TCP/IP timers, and the amount of additional traffic on the network besides that generated by the application.

Recommended Process for Latency Tuning Following is a process recommended to achieve deterministic Ethernet networking behavior. It uses Digi commercial off-the-shelf (COTS) firmware and hardware, and not any specialized products specifically designed to reduce latency. By following this process, you should be able to define and address latency issues at multiple levels in your network and application. In summary, the process involves five steps: 1. Determine the characteristics of your application, in terms of traffic pattern and amount of traffic generated. 2. Determine the latency budget and the type of latency in which you are interested. 3. If applicable, depending on the results produced in steps 1 and 2, optimize the physical layer. 4. If applicable, depending on the results produced in steps 1, 2, and 3, optimize the network and transport layer. 5. If applicable, depending on the results produced in steps 1, 2, 3, and 4, optimize the application layer. Best-Case Scenario The best-case scenario for achieving deterministic Ethernet networking behavior with DIGI COTS firmware and hardware is a unidirectional master-slave application running over an isolated Ethernet network that is built around Ethernet switches instead of Ethernet hubs. In other words, the best-case scenario is a network that eliminates unnecessary traffic and minimizes Ethernet collisions.

Chapter 11 Latency Tuning

115

Page 116

Recommended Process for Latency Tuning Step 1: Determine the Characteristics of Your Application The first step in addressing latency is to consider the characteristics of your application in terms of traffic pattern and amount of traffic generated. • What is the main purpose of the application, and the primary activities? • Traffic pattern: Is it peer-to-peer or master-slave application? • Amount of traffic generated (x bytes every y minutes): How much data is being transmitted from and received by the application, and over what amount of time? For example, 200 bytes of data sent over 500 milliseconds. Step 2: Determine Latency Budget and Type of Latency Identifying the latency budget for your application involves defining what latency means for your network and the application running on it. This latency budget influences how much optimization you may need to perform at the physical, data link/network, and application layers. • Define how much latency is acceptable. • Is the latency one-way or round-trip? Step 3: Optimize the Physical Layer Depending on the results produced in steps 1 and 2, optimize the physical layer; that is, address the physical-layer characteristics that can affect latency. Optimizing the physical layer, may include, but is not limited to, these recommendations: • Use Ethernet switches instead of Ethernet hubs to minimize unnecessary traffic and minimize collisions. • Use industrial-strength cabling and make sure the wiring is sound. Bad wiring can result in increased collisions. • Eliminate impedance mismatches. • Avoid running communications cabling on the same tracks with power cabling or other cabling exhibiting fast voltage swings • Use a smaller less noise-induced error-prone Ethernet, or data rate. Lower Ethernet speeds have higher voltages, at which background noise is less relevant and has less of an impact on latency. Voltages associated with 10, 100, and 1000 mbps Ethernet speeds are: • 10 mbps: 2.3V (CAT5) • 100 mbps: 0.8V (CAT5) • 1000 mbps: 0.5V (CAT5E/CAT6) • Ground to earth all your networking equipment, including the Digi device. • Use only networking equipment that is certified or known to operate well within the required ranges for vibrations, shock, operating temperature, relative humidity, etc.

116

Chapter 11 Latency Tuning

Page 117

Recommended Process for Latency Tuning Step 4: Optimize the Network and Transport Layers Depending on the results produced in steps 1, 2, and 3, optimize the network and transport layers. Optimizing the network and transport layers, may include, but is not limited to, these recommendations: • Isolate any unnecessary TCP/IP traffic from the network. • Choose smaller packets to reduce transit times through intermediate networking devices, as most of these devices are store-and-forward. • Increase the TCP/IP responsiveness to incoming/outgoing traffic by choosing appropriate values for various TCP/IP timers, such as the retransmission timer, the gratuitous ARP timer, and delayed acknowledgment timer. • Avoid the use of time-consuming encryption facilities. Command Options for Optimizing Network and Transport Layers

A major contributor to latency for the network and transport layers is unnecessary retransmissions of data. The command-line interface has several command options to help you reduce these unnecessary retransmissions. Most of these options are available through the command-line interface only, and not the web interface. For complete descriptions of these commands and options, see the Digi One and PortServer TS Family Command Reference. There are several considerations for using these latency-related command options: • Changing the options from their defaults may violate RFCs. • Decrementing the values for these options increases the amount of network activity, for example, there will be increased retransmissions. • For a peer-to-peer application, you need to consider both sides of the connection and how options are set. For example, if the setting for the “rto_min” option for the Digi device is set to a value that is less than the setting for the “delayed_ack” option for the other side of the connection, then there will be a forced retransmission of every packet of data. For a master-slave application, this consideration does not apply.

Chapter 11 Latency Tuning

117

Page 118

Recommended Process for Latency Tuning Command set tcpip set config

Option

Description garp=30-3600

The frequency of Gratuitous ARP (GARP) announcements. A Gratuitous ARP is a broadcast announcement to the network of a device’s MAC address and the IP address being used for it. This allows the network to update its ARP cache tables without performing an ARP request on the network. Gratuitous ARP announcements can affect latency in a limited way, because some systems stall or dispose of data that is transmitted during an ARP cache refresh. If this happens, setting the Gratuitous ARP frequency to be more often than the problem system’s time-to-live variable can cause it to refresh the cache without needing to perform a request.

rto_min=30-1000

The TCP minimum retransmission time out (RTO), in milliseconds. TCP uses progressively larger retransmit values, starting at a minimum value that is calculated from a sliding window of ACK response round-trip times that is bounded at the bottom by “rto_min.” So, essentially, “rto_min” is not necessarily the timeout that will be used as the starting retransmit timeout, but it is the smallest such value that could be used. This affects latency, because lowering “rto_min” ensures that retransmits take place in less time if they occur. By occurring sooner, the network is able to recover the lost data in less time at the expense of possibly retransmitting data that is still in-flight or successfully received by the other side, but unacknowledged due to a “delayed ACK” mechanism or something similar.

optimize={latency|throughput} This option is also available in the web interface at: Configuration > System > Optimization setting.

Configures how the Digi device handles network latency. If your Digi device handles delay-sensitive data, choose “optimize=latency.” If overall network throughput is more important than latency, choose “optimize=throughput.” For the Digi One IAP, the default is “latency.” For all other models, the default is “throughput.”

Step 5: Optimize the Application Layer Optimizing the application layer may include, but is not limited to, these recommendations: • Avoid having more than one application/network node generating timesensitive traffic in the network Have one traffic generator in a masterslave setup on the network. • Avoid running other (management) applications, such as email, image or mp3 downloading, etc., while time-sensitive traffic is running. • •

118

Check whether the application itself has timers that cause retransmissions of data. Use firewalls.

Chapter 11 Latency Tuning