4 ms·
A month or two ago I spoke to someone working in these shops. Apparently, they're using the FPGAs to run many of the high-bandwidth algorithms, because going fr
by tghw 16y ago
A month or two ago I spoke to someone working in these shops. Apparently, they're using the FPGAs to run many of the high-bandwidth algorithms, because going from NIC to motherboard to CPU and back again added too much latency. So they program the algorithms into the FPGA (which has its own Ethernet port) so it can receive, process, and send the data without ever hitting circuitry not dedicated to the task.
- cdavid 16y agoThis seems a bit surprising: what is the latency coming from the NIC to the motherboard ? I somehow doubt the latency due to distance within one piece of hardware matters (current CPU cannot do much more than a few 1000s cycles for the electricity to go around a few times in a motherboard, which is nothing to do any kind of advanced processing).
- bnoordhuis 16y agoThe problem is that a high-bandwidth link overruns the CPU with thousands of interrupts per second. It can paralyse the system, where the CPU is so busy handling I/O that it doesn't get around to actually scheduling processes. Disclaimer: I sometimes consult for HFTs but we don't use FPGAs (yet).
- cdavid 16y agoSo it is more an architecture issue with conventional hardware ? It makes much more sense to me with this explanation - the issue is the same as in most real-time systems then (like in embedded hardware for audio gears, which is more familiar to me than HFT). Don't things like real time linux or soft real time patches for linux help, though ?
- bnoordhuis 16y ago> Don't things like real time linux or soft real time patches for linux help, though ? I don't see how it could. The CPU essentially drops everything it's doing when a packet comes in. Have that happen often enough and there won't be time left to do anything else, unless you start dropping packets.
- larsberg 16y agoIt's pretty terrible (in HFT terms), particularly if you're trying to use a junky on-board NIC. Folks not using FPGAs use separate ethernet cards and enable kernel bypass and can do significantly better with that.
- brownegg 16y agoThis is true, but FPGAs can still only handle relatively simple algorithms. FPGAs make certain kinds of tasks nearly trivial (think truly parallel tasks such as decoding market data for different instruments), but there's just not enough gates (in most cases) to do interesting stuff in the application / logic layer. FPGAs canonical use case is still as very fast codecs. There are exceptions, but they're really only the very simplest of arbitrage strategies. And in order to make those work you need top-of-the-line network gear and engineers as well.
- deleted 16y ago[deleted]
- Nrsolis 16y agoWow. This is almost entirely wrong. Any modern FPGA (hint: the Virtex-5 they are using in these machines) can implement a relatively complex general purpose CPU. It wont be a Pentium 4, but it can be complex enough to run programs you'd need to design your own compiler for. Of course, they only ever use the IP cores that they need to implement the algorithm they want. That usually means modeling the limit order book. Monte Carlo, anyone?
- swah 16y agoBut a Virtex 5 could hold several simple CPUs designed for this task ;) I don't know if the algorithms they use can be expressed easily as state machines though.