Kx - Software Which Uses Every Available Core
Multi-core processors require multi-core capable applications, explains Simon Garland, chief strategist at Kx Systems, an extremely fast in¬memory and on-disk database that is a favorite of high-performance trading firms.
“A lot of database, application and CEP vendors talk about how they are multi-threaded, but they aren’t really,” he says. “They say they are multi-threaded, but they have a database thread and a user interface thread. So if they are running say 32 cores, they are just using two and the rest are sitting idle.”
Looking for a software company which could make use of a growing number of cores, Intel approached Kx.
“We thought this would be a brief connection until a bigger company came along,”
says the unassuming Garland. But software suppliers have been slower to make use of multi-core than Intel had expected, leaving Kx to grow its relationship with the processor provider. David O’Shea, Intel’s relationship manager for Kx in New York commented “Intel sees the value in the expertise of specialist software houses – these companies provide the relevance of our technology to the market and we have to find ways of leveraging our respective capabilities and expertise – small is (often) beautiful, and we recognize this at Intel.”
“If you come to us with 64 cores, we can use all of them for proper parallel execution,” adds Garland.
“In the standard benchmark for comparing us to someone else on the same machine, we can look unbelievably fast because we are using the full machine and someone else is using just a few of the cores.”
One reason that many applications don’t speed up with multiple cores is that they scatter cache around the cores as the application moves the processing from one core to another.
“The OS internal book-keeping gets so complicated because the data is spread over many different caches, which all have to be checked to make sure they are still current and safe to use.”
Kx’s application, Kdb+, benefits from running very tightly written code – about 100 KB –which has been fully rewritten to run multi-core.
“We had already produced versions of our code for Windows, OSX, Linux and Solaris on Sparc and Intel. We have rewritten it to make use of multiple cores. By contrast, a big application might take hundreds of man -years to rewrite al the code, find the unexpected interactions, fix the bugs and do QA.”
To achieve speed, Kx’s original product was written for distributed processing on multiple machines back in the 90s. Now with 64-bit computers, Kdb+ can run large applications on a single machine. But because it was written for distributed processing, its design matches the requirement of multiple processors and multiple machines. For now, Kdb+ makes use of multiple threads, but Garland expects the marketplace will focus more on multiple processors on multiple machines soon because some of the problems haven gotten so big.
Subprime, for example.
“Of the 100 firms that have been hit by subprime, probably only five or six are set up to properly value what they have. Most of them can’t do it, but those who can are in a much more interesting situation.” They can run what-if scenarios against portions of their portfolios to see the impact of a certain interest rate change and then determine which five percent they really need to focus on in the face of changing market conditions.
“It’s a big competitive advantage to be able to crunch through your portfolio and value it. You either value your whole portfolio at the individual holdings or you do general reporting based on a guesstimate. There is nothing realy in between. With Kdb+, senior managers can ask for a report on what happens to our Florida exposure if interest rates move by X percent and get the results a few hours later or even within minutes. Once you have a really powerful way to view the number you are in a totally different place from your competitors.”
Kx engineers work with Intel engineers and provide input into future designs and suggest approaches that would speed up processing.
“They share part of their roadmap with us so we can focus our development on software to take advantage of upcoming features. We are way, way faster than anyone else, and as long as we keep doing it on the latest hardware, we will continue to attract customers who have demanding applications.”
Filed under: Issue 5 - Summer 08, Risk, Technology


