By

12 GB GPU for 0.1$ per hour? Hello AWS p2

Read in the dark

Why p2.xlarge instances?

In this post I walked you through every single step towards running a g2.xlarge Amazon instance.

But what if 4GB memory is not enough? What if speed is critical? This is where you might want to use a p2 instance : they are powered by Tesla K80 Accelerators, each running a pair of NVIDIA GK210 GPUs. Each GPU provides 12 GiB of memory (accessible via 240 GB/second of memory bandwidth), and 2,496 parallel processing cores (ref). For the p2.xlarge instance you however have access to only 12GB.

According to this benchmark, the p2.xlarge is roughly twice as fast as a g2.xlarge and 3 times bigger (memory wise, you got that already)!

Pricing

The good news is : the pricing is not much worse with 0,900 USD / hour. And only ~ 0.11 USD / hour for spot instances.

Where are the p2.xlarge instances?

p2.xlarge instances are not available in every region, for now (it will probably change) they are in the US East (N. Virginia), US West (Oregon), and EU (Ireland) Regions. This means that if you don’t have an account in these regions, you’ll have to go over the same request process over again…

What AMI?

I have to say I have not been brave enough to build another AMI that supports Tensorflow & cie on GPU. I have used Bitfusion’s Tensorflow AMI. It costs 9 cents per hour + instance price which adds up to 0.99$/hour. Which is pretty fair I think. I don’t know these guys, I’m not advertising here, I just have to say it ran flowlessly in my case (using bi-directional GRU RNNs 2*200 units). Of course I still recommend using rsub or any other GUI over ssh to smooth things out.

Tensorflow 1.0 helped me get over it and go check this new AMI out! -> vict0rsch-2.0 (in N. Virginia, free of course..)

There is also AWS’s Deep Learning AMI. I have not tested it but be aware Amazon Linux does not rely on Ubuntu, if ever that was critical for you.

Benchmark

I haven’t had the time yet, but a benchmark is on the way comparing free tier micro instances, g2.xlarge and p2.xlarge. If you want to see larger instances at work, do send me some $ and I will!