ADSL Network Latency Explained

Many of the network connections Skyway West provisions for customers are based on Telus ADSL. Like all network technologies, the ADSL link introduces latency into the network path. That latency is the result of a number of causes. The single largest cause of latency on Telus ADSL is the data interleave configuration on the DSLAM (Digital Subscriber Line Access Multiplexer). Skyway West optimizes phone line quality vs latency, reducing latency by as much as 50%, to ensure the best possible ADSL connection.

Latency is a measurement of time. The base latency of a network segment is the minimum amount of time it takes to send a (minimal size) packet across the network. Much has been written on it in the past including this excellent article by Stuart Cheshire of Stanford University. Everybody agrees that all else being equal, the less latency in a network, the better.

The most obvious source of latency is geographic distance. Light, or electricity, takes time to traverse distance, so the longer the network is in real terms, the higher the latency. But when considering all the sources of latency that contribute to the final latency of a circuit, latency from distance is often swamped by less obvious sources.

Another source of latency is the packet itself. We don’t measure network latency from the time the first bit of a packet is sent until the time the same first bit arrives at the destination router; instead we have to wait until the packet has arrived in its entirety. The larger the packet size, the longer the latency to transmit the packet. In fact the difference in latency between two different packet sizes can be used as a crude estimate of available bandwidth. When a QoS scheme like priority queuing is employed to minimize latency for a certain class of service, such as VoIP, the QoS still cannot minimize latency to anything less than the base latency for a maximal-size packet. The latency difference between the smallest packet and largest packet supported by the network represents the best-case latency jitter.

Then there’s buffering. A buffer is temporary memory for packets. Buffers are usually constructed as queues. A buffer queue might hold from zero up to X maximal-sized packets. Buffers may often be tuned in router settings. Quality of Service (QoS) schemes are usually implemented by creating multiple buffer queues and sorting packets into them based on some criteria. The best practices for buffer schemes and tuning are still up for debate.

On the ADSL network there’s a major potential source of latency, and it’s called interleaving. The phone line is a very noisy, nasty place to carry radio-frequency data signals, with plenty of ingress noise and transient conditions. ADSL transceivers encode the data to be sent with extra error correcting codes (ECC). The ECC algorithms try to detect bit errors and correct them if possible, or flag them as invalid if not. ECC works really well when the error distribution is light and even; it has a hard time when a whole chunk of data many bits long goes missing due to interference on the line. Interleave is used to shuffle the stream of data amongst itself so that when a long error burst hits, then the data is de-interleaved, the error burst appears to be a large number of small errors rather than a single large error, and the ECC code is able to perform the many small corrections.

ADSL network interleave is a tunable setting on the DSLAM at the telco end. The modem and the DSLAM negotiate an upstream and downstream interleave when the modem establishes a connection. The more interleave is turned on, the stronger the ECC correction becomes and the less likely a packet will have to be discarded due to damage from noise on the line. However, the more interleave is turned on, the higher the base latency of the ADSL connection. To interleave data, the modem must buffer enough data to have something to interleave with. This buffering represents latency, and the amount of latency involved can be quite substantial.

Therefore the optimal amount of interleave applied to an ADSL connection should be determined by the general quality of the phone line. On a line where ECC is often correcting errors in packets, it’s worth giving up some latency in return for the error resistance. The alternative is to discard the uncorrectable packets for packet loss. But when the phone line is of good quality and ECC hits are rare to nonexistent, it’s then better to minimize interleave or disable it outright for the best latency performance.

A low interleave setting will yield a service in the BC Lower Mainland with latency on the order of 15ms or less across the ADSL hop, while the BC Interior should be less than 30ms.  Times to Kelowna and Kamloops should be less than 25ms. Latency to customers in Calgary or Edmonton can be configured for less than 30ms, except for Fort McMurray and other places in northern AB, where 35ms is the norm. But if the phone line experiences a lot of noise from radio stations, bad telephone wiring or etc, the best network performance may be found with an interleave setting tuned to favour ECC, for higher latency but less packet loss. It’s a balancing act.

It takes some expertise to consider phone line quality statistics and optimize settings for the best possible ADSL performance, but it also means giving every new installation our full attention and best support we can provide. Few other ADSL providers will test and ticket for latency. I’m proud that Skyway West goes the extra distance to optimize ADSL performance.