Once in a while, I like to play video games, but as an occasional gamer, it isn’t worth the money to invest in a dedicated gaming rig or brand new PS5. Both would probably be collecting dust somewhere in a corner for most of the year. So as an alternative, I wanted to have a system running in the cloud that I can boot when I want and enjoy some casual gaming. Yes, I could subscribe to a cloud gaming service like GeForce NOW, but where’s the fun in that? As an AWS enthusiast with some spare AWS credits, I figured it would be an excellent opportunity to learn a bit more about GPU-accelerated instances. In this first post around the topic I’ll start with a bit of research, as I want to get the most bang for my buck credits. Mainly; what instance type performs best for this purpose? Let’s try to find out!

Accelerated Instances

Almost 12 years ago already, in 2010, the first GPU-accelerated instance family was announced, the Cluster GPU Instance or CG1. Followed by the G2 in 2013, the G3 in 2017, and the G4 in 2019. The latest addition to the family are the G5 instances, released at the end of 2021. In addition to the g-series, there are also the P-series instances which are primarily intended for machine learning and high-performance computing workloads. So for this post I’ll focus on the g-series.

Instance Type GPU CPU
g3 NVIDIA Tesla M60 Intel Xeon (Broadwell E5-2686 v4)
g4dn NVIDIA T4 Tensor Core Intel Xeon (Cascade Lake P-8259L)
g4ad AMD Radeon Pro V520 AMD EPYC (AMD EPYC 7R32)
g5 NVIDIA A10G Tensor Core AMD EPYC (AMD EPYC 7R32)
g5g NVIDIA T4G Tensor Core AWS Graviton2 (ARM)

In the table above, you’ll find the currently available G-series instances, mainly accelerated by NVIDIA GPUs. As you see, the GPUs used are not the typical GeForce RTX or Radeon models you’ll find in your local computer parts shop, but instead the instances are equipped with special datacenter GPUs. Looking solely at the GPU, I would expect that the g5 instances, equipped with NVIDIA A10G GPUs are the clear winner when it comes to performance. It is the most powerful GPU in the list, which is also being used on NVIDIA GeForce NOW, in their RTX3080 tier. There is an excellent article on Tom’s Hardware that explains the differences between the two GPUs.

The g5g is an instance family that is based on ARM CPUs and since Windows currently doesn’t run on that I can already scrap this family of my list of potential candidates.

Benchmarking

To evaluate performance I ran a few benchmarks. I used the smallest instance type available, which apart from the GPU, have comparable configurations and should be capable of running most modern games at decent settings. All instances were deployed using the latest Windows 2019 AMI with the latest drivers installed and the GPU optimization settings applied according to the instructions in the official AWS documentation. One thing to note is that there is no NVIDIA gaming driver available for the G3. This means I needed to use the GRID drivers, which are not optimized for gaming.

To view the remote display I used NICE DCV, which allows you to stream the output of graphics-intensive applications to your local desktop in resolutions up to 4K. I’ve uploaded a CloudFormation template and some installation scripts to GitHub in case you want to try this yourself.

I used 3 different benchmarks, Unigine Superposition, 3DMark Timespy and 3DMark Firestrike. For Superposition I ran the benchmark with the 1080p High and 4K Optimized profiles. For 3DMark I used the benchmark with the default settings that come with the free version of the software. I ran each of the benchmarks twice and selected the best results, which in almost all runs were pretty similar. The instances, as shown in the table below, were deployed to the Ireland (eu-west-1) region.

Instance Type GPUs CPUs Memory GPU Memory On-Demand*
g3s.xlarge 1 4 30.5 8 GB $0.98000
g4dn.xlarge 1 4 16 16 GB $0.77100
g4ad.xlarge 1 4 16 8 GB $0.60663
g5.xlarge 1 4 16 24 GB $1.30700

*On-Demand pricing as of August 2022, Ireland (eu-west-1) region

And now on to the results…

Unigine Superposition

Unigine Superposition

Unigine Superposition is a quite enjoyable benchmark in which you’ll see a scene of a classroom in which a professor is researching the quantum theory.

3DMark

3DMark Timespy

In both benchmarks, the clear winner is, as expected, the g5.xlarge. What is interesting is that the g4ad, with AMD GPU, beats the g4dn with NVIDIA gpu, while its on-demand price is about $0.16/hour cheaper. With the g5.xlarge being more than twice as expensive ($1.307 vs $0.60663) in the Ireland region I’ll try my luck with the g4ad.

Spot Pricing

Now that I found my new favorite instance type, I also wanted to see if using Spot would be an option. Me playing Red Dead Redemption 2 is probably not the most critical workload on the AWS platform, so if I get kicked out of my game it might be annoying but not the worst that can happen. If you want to find the availability of Spot instances in a particular region, it’s good to have a look at the Spot Instance Advisor to see how much demand there is for your instance type. For pricing refer to the pricing page or use the DescribeSpotPriceHistory API the CLI or SDK. Since I’m based in Europe, I quickly skimmed through the European regions and the instance is only available in the Ireland, London and Frankfurt regions. In my case, and these values change over time, the g4ad isn’t being interrupted much in the Frankfurt (eu-central-1) region and also has a nice discount!

g4ad.xlarge Interruption Savings On-Demand Spot
eu-west-1 >20% 43% $0.60663 $0.3458
eu-west-2 5-10% 49% $0.62671 $0.3168
eu-central-1 <5% 50% $0.65727 $0.326

Summary

In this post, I benchmarked a number of GPU instances to find a suitable one for running games. The key takeaway is that you should always carefully select a proper instance type for your workload, as it can give you huge benefits when it comes to costs, but also performance. For me this is the g4ad.xlarge, but for your graphical intensive workload it could be something else. With my instance selected, I’ll now figure out how to best configure a system for gaming, so stay tuned for more!

Photo by Isaac Smith on Unsplash

comments powered by Disqus