Cheap HPC

50
Cheap High-Performance Computing Alex Moore, HMB Inc.

description

Talk I did for a vendor session at CodeMash one year.

Transcript of Cheap HPC

Page 1: Cheap HPC

Cheap High-Performance ComputingAlex Moore, HMB Inc.

Page 2: Cheap HPC

About Me

Consultant for HMB, Inc.

.NET / Web / Java Developer

Polyglot Glutton - dabble in a lot of other languages.

BSCSE, The Ohio State University

Page 3: Cheap HPC

About Me

I like supercomputers

Page 4: Cheap HPC

Why Cheap HPC?

Page 5: Cheap HPC

Why Cheap HPC?

Because sometimes we need to go fast(er).

Page 6: Cheap HPC

Why Cheap HPC?

Because sometimes we need to go fast(er).

We all love saving money.

Page 7: Cheap HPC

Why Cheap HPC?

Because sometimes we need to go fast(er).

We all love saving money.

Ways to get extra performance for little to no extra money.

Page 8: Cheap HPC

Untapped PowerGPGPU

Page 9: Cheap HPC

GPGPU

Gesundheit?

Page 10: Cheap HPC

GPGPU

General Purpose computing on

Graphics Processing Units

Page 11: Cheap HPC

GPGPU

Page 12: Cheap HPC

GPGPU

GPUs are great at simple programs that are massively parallel, such as rendering images.

Page 13: Cheap HPC

GPGPU

GPUs are great at simple programs that are massively parallel, such as rendering images.

They can do this because they have many shaders, or “Compute Units”

Page 14: Cheap HPC

GPGPU

GPUs are great at simple programs that are massively parallel, such as rendering images.

They can do this because they have many shaders, or “Compute Units”

Shaders can be programmed to do most things that a normal CPU can do.

Page 15: Cheap HPC

GPGPU!

Page 16: Cheap HPC

GPGPU!

This Laptop (2007):

32 Compute Units across 4 cores @ 940 Mhz

128 MB DDR3

Page 17: Cheap HPC

GPGPU!

This Laptop (2007):

32 Compute Units across 4 cores @ 940 Mhz

128 MB DDR3

Tesla (NVidia GPGPU card)

448 Compute Units across 16 cores @ 1.15 Ghz

Up to 5GB DDR5

Page 18: Cheap HPC

GPGPU!

This laptop’s GPU has about as much computing power as the world’s fastest supercomputer in 1993 (~91 GigaFLOPS)

Page 19: Cheap HPC

GPGPU!

Special desktop computers with 4 Tesla cards can do about ~4-5 TerraFLOPS

About the fastest supercomputer in 1999-2000,ON YOUR DESKTOP

Page 20: Cheap HPC

GPGPU!

That’s ridiculously crazy

Page 22: Cheap HPC

GPGPU!

Page 23: Cheap HPC

GPGPU!

So what’s cheap about it?

Page 24: Cheap HPC

GPGPU!

So what’s cheap about it?

Page 25: Cheap HPC

GPGPU!

So what’s cheap about it?

You can probably program your GPU, and it’s just free untapped power

Page 26: Cheap HPC

GPGPU

NVidia - CUDA

ATI - Stream SDK

Microsoft - DirectCompute

Apple - OpenCL

Page 27: Cheap HPC

Problem Euler Demo

The following iterative sequence is defined for the set of positive integers:

n n/2 (n is even)n 3n + 1 (n is odd)

Using the rule above and starting with 13, we generate the following sequence:

13 40 20 10 5 16 8 4 2 1

Page 28: Cheap HPC

Project Euler 14

Page 29: Cheap HPC

Project Euler 14

Ruby ~151s

Page 30: Cheap HPC

Project Euler 14

Ruby ~151s

C#/Java ~6.1s

Page 31: Cheap HPC

Project Euler 14

Ruby ~151s

C#/Java ~6.1s

C# Multithreaded ~3.2s

Page 32: Cheap HPC

Project Euler 14

Ruby ~151s

C#/Java ~6.1s

C# Multithreaded ~3.2s

C (gcc -O3) ~0.5s

Page 33: Cheap HPC

Project Euler 14

Ruby ~151s

C#/Java ~6.1s

C# Multithreaded ~3.2s

C (gcc -O3) ~0.5s

C / OpenCL ...

Page 34: Cheap HPC

OMG Ponies Live Demo!

Subset of c99No recursion, no function pointers, no standard headersNo extern, static, auto, registerNo writes to pointers or arrays of datatypes smaller than int

Page 35: Cheap HPC

To The Cloud! Cloud Computing

Page 36: Cheap HPC

The Cloud

If you use the cloud for your site or as a datastore right now, you can acquisition temporary extra computing power very easily.

Page 37: Cheap HPC

The Cloud

TalentRooster needed to re-encode all 1200 of their video resumes.

To do this locally, it would have taken about 27 hours, with 60% of that time would have been downloading and uploading.

Page 38: Cheap HPC

The Cloud

Page 39: Cheap HPC

The Cloud

The dev team added an extra EC2 instance, and re-encoded the videos in 3 hours.

Page 40: Cheap HPC

The Cloud

The dev team added an extra EC2 instance, and re-encoded the videos in 3 hours.

Total Cost:

Page 41: Cheap HPC

The Cloud

The dev team added an extra EC2 instance, and re-encoded the videos in 3 hours.

Total Cost:

$5.46

Page 42: Cheap HPC

The Cloud

Amazon also has instances with 2 Telsa GPUs on each instance. - Just sayin’ :)

Page 43: Cheap HPC

Stealing Candy From BabiesWindows HPC Server 2008 R2

Page 44: Cheap HPC

HPC Server

Instead of buying more computing power, just make idle computers do your work.

Page 45: Cheap HPC

HPC Server

HPC Server 2008 R2 allows you to add Windows 7 workstations as compute nodes.

Also allows Azure instances to be added as compute nodes when you need extra horsepower.

Page 46: Cheap HPC

HPC Server

About $925 for the Suite, including licenses for compute nodes.

Page 47: Cheap HPC

Time and Money

Page 48: Cheap HPC

Time and MoneyTime

HPC SERVER GPGPUCLOUD CTHREADING

Page 49: Cheap HPC

Time and MoneyMoney

HPC SERVER

GPGPUCLOUD

CTHREADING