Busting Through the Latency Wall
Wed, 16 Feb 2011 22:21:00 GMT
High-Frequency Trading (HFT) – the Need for Network Speed
By David Quarrell | Sponsored by OnX Enterprise Solutions
The unique demands of the HFT market are driving technologists to extraordinary lengths in their quest to be first in the race to zero. Like travelling at the speed of light, we know it’s impossible but that doesn’t stop us from dreaming. In the HFT market, we want to reduce the latency between bid/offer and placement to zero, motivating us to look beyond generic computing techniques. The high-performance computing (HPC) community has driven the super-computing market for the last 40 years; however, the HPC folks don’t offer a solution to the HFT community. We don’t have vast quantities of data to process, rather, we want a quick decision posted to the market in zero time. Thus, we turn to low-latency network providers, but they have split into two camps: TCP bypass and InfiniBand.
A short history of TCP
- 1969 – First packet switching to support ARPANET
- 1973 – TCP defined by Vinton Cerf, et al.
- 1982 – Sun Microsystems bundled TCP into the first commercial offering
- 1992 – Linux released with TCP bundled
- 1994 – Microsoft bundled TCP with Windows
Since then, TCP has been re-implemented to make the stack more efficient at passing data from network to application. The latest attempts bypass the operating system so that special libraries in the application pass data straight to the network, which relies on powerful processors on the network card not previously available.
A shorter history of InfiniBand
- 1999 – Defined by InfiniBand trade association of IBM INTEL and Sun Microsystems
- 2004 – Open Fabrics Alliance produced the Linux implementation
- 2005 – OFA produced the first Windows implementation
TCP is the major bottleneck of performance, the sources of latency and jitter. A quick scan of the latencies illustrates the problem.
| Protocol | Latency |
| TCP | 20 Microseconds |
| TCP Bypass | 10 Microseconds |
| InfiniBand | 5 Microseconds |
So what’s the catch?
If that’s all there was to it, there wouldn’t be much more to say on the subject. However…
- Implementing InfiniBand is like learning Japanese. There is so much more to it—a culture, a way of life—so simply learning the language alone is not enough. More literally, to get the best out of InfiniBand, you must re-programme your applications.
- To fully implement TCP bypass, you must ensure that the Ethernet is reliable because the functionality TCP gave you is not there anymore. Ethernet can be made reliable using a mesh of routers, but you won’t know how the packets arrived. That makes the mesh unpredictable, increasing the jitter—a bad thing in fast networks.
Even 40Gbit and 100Gbit are no good to us.
There is great talk about 40Gbit Ethernet, which was ratified in June of last year, but don’t be deceived. 40GbitE and 100GbitE address bandwidth issues, not latency. Never mind the quality; feel the quantity–great, if you are streaming video, because the human mind will tolerate a jitter of 200 milliseconds. In the HFT market, however, that amount of delay would cause firms to be arbitraged to zero!
There is only one thing to do–keep chipping away at the problem. If you have the time and money to re-programme applications, give InfiniBand a shot. Otherwise, a cost analysis of the TCP bypass versus TCP over InfiniBand is the only sensible approach. In either case, you must experiment to understand where the latencies exist in the end-to-end service.
Where’s the next bottleneck?
Understanding where latencies exist in the service is the key to deploying resources, but for that, you must have accurate measurements of the working environment. Laboratory conditions are too clean and unrealistic, because the timings we are discussing are so close to processor speeds that external factors will play a big role in the outcomes. Time-stamping packets and flows would be useful but for the fact that the current time-keeping protocol, Network Time Protocol (NTP), is much too inaccurate for the HFT market. Some relief is offered with Precision Time Protocol (PTP), which allows computers to synchronize watches to within 60 microseconds; however, time-stamping packets requires implementing PTP on the network card, something that hasn’t happened, yet.
Opportunities exist for technologists who are relentlessly pursuing the race to zero. Those who adapt to the evolution will continue to thrive, but like any race, those who fall behind can always make a comeback if they redouble their efforts. Either way, it’s a great race for all because it never ends.
Biography
David Quarrell has more than two decades’ experience implementing technology solutions, 15 of which have been in service to the financial sector. Prior to joining Agilysys Technology Solutions in the United Kingdom as senior solutions architect and technology consultant, he was principal engineer and lead consultant for Sun Microsystems, London.
Having been educated at Coventry University in Electronic Engineering, David’s transition to computer science was a natural progression. Certification as a Java SCEA Solution Architect further enhanced his industry standing, leading to participation in large-scale benchmarking and performance-tuning exercises for Sun’s largest IT projects. David has played a major role in the automation of transaction, settlement and electronic exchanges, where he has the dual distinctions of configuring the systems that replaced the LIFFE open outcry market and building the surveillance systems for the London Stock Exchange.
His ability to exploit technology and understand the non-functional requirements of a business has been key to operational excellence and success. Goal-driven and a creative problem solver, he addresses complex challenges and delivers results against demanding timescales, taking into account commercial, operational, strategic and technical requirements.
Of late, David’s expertise in low-latency networking, performance and security has been in particular demand, having been inspired by the prominence of high-frequency trading, or “trading where speed matters,” in the U.S. and European markets. With today’s need for split-second execution, HFT continues to gain market share of daily trades.
In his spare time, David is a die-hard Welsh rugby fan, and also enjoys when warm weather arrives so that he may spend days hill walking in Scotland and indulging his passion for sailing. He has skippered a 10m (33-ft) sailing yacht for a number of years and often provides needed support to host regattas in the sport he enjoys so much.
He shares his views on his blog: www.AgilysysFinancialITBlog.com
If you would like to reach David, please contact Anita O’Malley at +1 732.692.1934

