Can we afford to have a supercomputer?

Tianhe-1A is currently the fastest supercomputer in the world with 2.5 PFLOPS computation power. It is nearly 50% faster than the former number one system – the Cray  XT5 “Jaguar”.  Jaguar’s computation power comes from its 224,256 AMD Operon cores but Tianhe-1A’s architecture is fundamentally different.  Tianhe-1A is equipped with 14,336 Intel CPU and 7,168 NVidia Graphics processing units (GPU), so most of its computation power comes from video card (GPU) rather than CPU.

What can GPU do in reality?  Especially in finance industry?   In 2009, Bloomberg realized the power of GPU.  So instead of installing 1,000 new servers, Bloomberg is using 48 server / GPU pairs to price its asset-backed security.  According to their CTO, Shawn Edwards, “Overall, we’ve achieved an 800% performance increase, what used to take sixteen hours we’re computing in two hours.”  Bloomberg is not alone; BNP also uses GPU to price their derivatives.  Other software vendors such as MATLAB supports GPU in its Parallel Computing Toolbox.  General-Purpose computation on Graphics Processing Units (GPGPU) has been gaining huge momentum in financial industry.

What is GPU anyway?

If you have a computer, then you have a GPU.  GPU is the processor on your video card; it is used to produce 2D graphic, 3D scenes, capture TV signal, decode / encode high definition video… etc.  Like CPU, it is also programmable; game developers have been using Open GL and DirectX to create video games which involves a lot of computations.

What are the difference between CPU and GPU?

Currently, i7-990X is the fastest Intel CPU and it has a clock speed of 3.46 GHz.  3.46 GHz?  It is not very impressive when we looked back to CPU history; Intel Pentium 4 had already reached the clock speed of 3.4 GHz back in 2004.  The CPU clock speed didn’t increase a lot for the last 7 years; it has reached its limit.  Clock speed used to be the major performance factor for CPU.  Instead of increasing clock speed, CPU manufacturers, AMD and Intel have increased the number of cores in each CPU, e.g. 2-core, 3-core, 4-core.  There are 6 cores in i7-990X. 

NVIDIA did a comparison between CPU and GPU and we can see there is a quiet revolution.  GPU’s computation power had grown exponentially where CPU remained quite linear.

image

Well, let’s look at today’s GPU; AMD Radeon HD 6970 has 1536 stream processors; its computer power is 2.7 TFLOP and 683 GFLOP for single precision and double precision respectively.

How about price?  Intel i7-990X is $999 and AMD 6970 is only $359.

CPU has its advantages.  A desktop PC can have up to 24 GB memory for as little as $400 and server can install up to 144 GB memory.  GPU on the other side is quite expensive to increase its memory, e.g. NVIDIA GPU, C2070 has 6 GB memory but it costs $4,000.  So if our application requires a lot of database activities and little calculation, then CPU is still the best.

CPU is still much faster in term of single thread processing; AMD 6970 has only up to 880 MHz Engine clock where we can find CPU with clock speed over 3 GHz.  If our application involves heavily sequential processing and cannot break down for parallel computing environment  (multi cores), then CPU would perform much quicker.

How to program GPU?

GPU used to required special programming languages (e.g. OpenGL) to develop GPU applications.  In 2006, NVIDIA released CUDA, a SDK that allows developers to use C, a general programming language to code in GPU.  It is a major milestone towards General-Purpose computation on graphics processing units (GPGPU).  CUDA has been evolved to support other general programming languages such as C++, FORTRAN, Java, Python and Microsoft .Net Framework.

NVIDIA also introduced Parallel Nsight, a FREE GPU development environment that is tightly integrated with Microsoft Visual Studio, the world’s most popular development environment.

The bottom-line is if we know Visual Studio, C / C++ and have vector programming experience, then congratulation!  We can start GPGPU development now.  Here is a link to some CUDA samples.

If we like to develop GPU applications that can run on heterogeneous systems rather than just NVIDIA video cards, then we can consider either OpenCL or DirectCompute.

What is the future of GPU?

Before we look into the future, let’s look at today!  GPU is getting very popular in scientific research, financial modeling and other general purpose computation intensive areas.  For example,  Folding@Home is a distributed computer project that study the relationship between protein folding and diseases such as cancer, Mad Cow (BSE), Alzheimer’s…etc.  It has a computation power of 9.4 PFLOPS and 92% (8.7 PFLOPS) is generated from GPU.  We can find more successful stories from NVIDIA.

Not every application can benefit from GPU but GPGPU is going to offload a lot of computation intensive code from CPU in near future.  Is our application ready?

Conclusion

GPGPU has offered us an opportunity that is cost effective and scalable.  Let’s review Bloomberg’s bond pricing system again; how much would it cost to build 1,000 servers, plus future maintenance cost including space rental and electricity?  Now they have only 48 servers!  It is also much easier to scale it up!

No matter if our systems are going to run on CPU or a hybrid environment (both CPU / GPU), it is going to be multi core.  Intel is working on an experimental 48-core processor that can theoretical expand to 1,000 core.  So we must re-think, re-design and re-develop our algorithm, code and system to support multi core.  If we want to migrate out software to GPU, we must also consider the constraint of GPU; i.e. it does not work well with memory hunger systems.

How much video cards do we need to build a supercomputer?  I would say if we can build a PC farm that accommodates 20 video cards, then we have a supercomputer in our basement.  We can install 3 video cards on a motherboard, e.g. ASUS Rampage II Extreme; so we need about 7 PCs. 

Can we afford to have a supercomputer?

Multi core is our future!

Andrew Chan is the owner and founder of ALG Inc.

We help you to make better and faster decisions!

About Andrew Chan
Andrew Chan is an Business Consultant who gives you accurate, consistent and timely information so that you can make better and faster decisions. He is an Associate of Society of Actuaries with over 20 years of IT experience. Apart from strong analytical skills and proven technical background, he was also a former system director at Manulife who had extensive project management experience. If you are looking for someone to gather, consolidate, validate, visualize and analyze data, look no further! Andrew can provide the most cost effective business analytics solution so that you can explore, optimize, predict and visualize your business. Don’t guess on any decision, no matter it is finance, operation, marketing or sales! Always ask for evidence!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: