|
Linux in the Enterprise: NSE Case Study
Linux stars in Mission: Critical
Linux is growing out of Unix’s shadow and handling mission-critical
tasks on its own. The National Stock Exchange recently replaced a Unix-based
system for risk management with a Linux-based one and saved a packet in the
process. Stanley Glancy reports
It was the commissioning of the National Stock Exchange
(NSE) in the mid-90s that brought about a technological revolution and changed
the face of the securities market in India for the better. Thanks to this proactive
initiative, NSE is today numbered among the top five exchanges in the world
in terms of volumes traded. NSE was also one of the first exchanges in the country
to introduce instruments like derivatives, a market similar to equity where
you trade in futures and options.
The
introduction of derivatives towards the end of the last millennium furnished
market players with further opportunities. Two important aspects of this segment
were clearing and settlements, and risk management. The risk management system
enables online risk and position monitoring of members. The system, developed
by NSEs IT spinoff NSE.IT, sends out alerts to the trading system and
risk management team and if a broker goes past his acceptable risk limits, his
account is disabled in real-time. For instance, if one trade crosses the limit,
the second trade, a second later, will be automatically rejected. Thus, NSEs
risk management system plays a critical role by nipping the possibility of a
default in the bud.
Need for a cost-effective risk management solution
NSE had a Unix-based system in place for equity trading
but felt the need for a more cost-effective risk management solution for its
derivatives segment. The team working on the project had to consider various
issues. Real-time throughput was required to analyse trade risk factors. The
team also had to ensure that the system wouldnt collapse under high loads.
Linear scalability was another key issue. After considering various options
it was decided to go for a Linux cluster computing solution, initially on an
experimental basis.
Says G M Shenoy, senior vice president of NSE.IT, NSE
was looking at large amounts of computation. There were more than 1,000 trading
members and over 200 clearing members. Initially we were looking at around 50
trades per second, which would mean 100 value at risk (VAR) computations/second.
Parallelism was the only answer. VAR is a term for risk analysis that
has been defined and approved by economists.
The development team decided to use a cluster of inexpensive
Linux-based machines powered by Intel processors and use MPIS (message passing
interface standard) for clustering infrastructure, with a switched Ethernet
100 Mbps network. It was decided to use multiprocessor hardware to handle non-parallel
components like data sharing.
During this experimental period, R&D was conducted
on the platform to ascertain the robustness of the system and to demonstrate
the use of Linux for a real business application requiring high-level floating
point computations at high performance levels.
The concept worked. From there on it was a matter of
fine-tuning and putting it into production.
Initially NSE had deployed SuSe Linux but later on
moved to RedHat Linux 7.2 as it was more ubiquitous.
Says Shenoy, Plenty of information was available
on the Internet with reference to Red Hat Linux, which was not the case with
other Linux packages. Also, it was easier to get drivers for Red Hat Linux.
Another factor that went in favour of Red Hat was that it was easier to get
support.
From 50 trades/second a year ago, NSE today handles
more than 500 trades/second. Each trade calls for two VAR computations.
How Prism works
The system set up for doing VAR calculations has been
christened Prism (parallel risk management system). Prism consists of a centralised
mother machine that is in turn connected to a number of child machines.
The mother, a dual-CPU Intel Xeon 1 GHz server, which
runs Red Hat Linux 7.2, receives the trade information. Also, the trading positions
and margins of all the members are maintained in the memory of the mother machines.
The mother machine is fault-tolerant. All the computations that take place on
the mother machine are copied onto another machine. This ensures data recovery
in case of a breakdown or disaster.
The information is then distributed by the mother machine
to the child machines. The child machines are single-CPU Intel PIII 800 MHz
workstations. These machines do the margin computation, which is then sent back
to the mother. Currently, there are five child machines. But NSE plans to scale
up in terms of numbers once trade volumes go up. The Linux children need no
management, only the IP address has to be configured to install a replacement
child.
Prism set NSE back by around Rs 15-20 lakh. The savings
have been substantial when compared to the cost of setting up a Unix-based system,
where the cost of acquiring the mother machine itself would have been more than
Rs 20 lakh.
The current system can be scaled up to 1,000 trades/second.
The software development has already been done, and as we have seen, the hardware
costs are trivial. According to Shenoy, it has been possible to keep the costs
so low only because of the Linux-based systems.
Very few exchanges in the world are said to have a
robust and cost-effective system like the one developed by NSE. Prism is a system
that can be replicated by other exchanges in the country, even in the capital
markets, and also to drive up volumes in the derivatives segment.
An interesting sidelight in this effort is the fact
that Prism was developed by NSE.IT, a spin-off company that consists of the
in-house IT team that had worked on NSEs core systems. NSE.IT is today
a profit making export-oriented company and is planning to go global with its
services and products. Thus it was NSE.IT that was entrusted with the task of
coming up with a solutiona cost-effective but world class risk management
system. Will NSE.IT tread the trail blazed by i-flex, which was spun off from
Citicorp Overseas Software (COSL) to productise and market the banking software
developed by COSL? If it does, you may see Linux starring in more versions of
Mission: Critical in other global markets. Mission: Critical II, anyone?
|