Amazon EC2 G4 instances, originally launched in 2019 with NVIDIA GPUs (G4dn) and 2020 with AMD GPUs (G4ad), are currently the most cost-effective and versatile GPU instances for deploying machine learning models and for graphics-intensive applications.
The latest generation of NVIDIA GPU-based instances, Amazon EC2 G5 and Amazon EC2 G5g was released in late 2021.
Amazon EC2 G5 is powered by NVIDIA’s A10G Tensor Core GPUs and second generation AMD EPYC processors and delivers up to 3x better performance for graphics-intensive applications and machine learning inference and up to 3.3x higher performance for machine learning training compared to Amazon EC2 G4dn instances.
Amazon EC2 G5g are the first Arm-based instances to feature GPU acceleration, and are powered by AWS Graviton2 processors and feature NVIDIA T4G Tensor Core GPUs.
Amazon EC2 G5g instances provide the best price performance in Amazon EC2 for graphics workloads such as Android game streaming — reducing development effort and lowering the cost-per-stream per hour by up to 30%.
Use cases for Amazon EC2 G4 instances
They are currently the most cost-effective and versatile GPU instances for deploying machine learning models and for graphics-intensive applications such as:
- Image classification
- Object detection
- Recommendation engines
- Automated speech recognition
- Language translation
- Remote graphics workstations
- Video transcoding
- Photo-realistic design
- Game streaming in the cloud
Cloud cost management from Anodot automatically recommends when an older-generation instance (like one in the EC2 G3 family) should be upgraded to a G4 or G5 instance for your compute-intensive workload.
Amazon EC2 G4dn NVIDIA-based GPU instances
Amazon G4dn instances provide the latest generation NVIDIA T4 Tensor Core GPUs, AWS custom second generation Intel® Xeon® Scalable (Cascade Lake) processors, up to 100 Gbps of networking throughput, and up to 1.8 TB of local NVMe storage.
When to use Amazon EC2 G4dn instances
G4dn instances are the best option for small-scale machine learning (ML) training and GPU-based ML inference due to included hardware optimizations like Tensor Cores.
Amazon EC2 G4dn instances are ideal for deploying machine learning models in production such as:
- Image classification
- Object detection
- Recommendation engines
- Automated speech recognition
- Language translation
Furthermore, G4dn instances are best suited for graphics applications that require NVIDIA libraries such as CUDA, CuDNN, and NVENC.
- Remote graphics workstations
- Video transcoding
- Photo-realistic design
- Game streaming in the cloud
Amazon EC2 G4dn.xlarge and G4dn.2xlarge details and pricing options
API Name | g4dn.xlarge | g4dn.2xlarge |
Type | Single GPU VM | Single GPU VM |
Memory | 16.0 GiB | 32.0 GiB |
vCPUs | 4 vCPUs | 8 vCPUs |
Storage | 125 GB NVMe SSD | 225 GB NVMe SSD |
Network Performance | Up to 25 Gigabit | Up to 10 Gigabit |
Linux On-Demand pricing | $0.1315 per Hour per vCPU | $0.0940 per Hour per vCPU |
Linux Reserved pricing | $0.0828 per Hour per vCPU | $0.0592 per Hour per vCPU |
Linux Spot pricing | $0.0394 per Hour per vCPU | $0.0292 per Hour per vCPU |
Windows On-Demand pricing | $0.1775 per Hour per vCPU | $0.1400 per Hour per vCPU |
Windows Reserved pricing | $0.1288 per Hour per vCPU | $0.1052 per Hour per vCPU |
Windows Spot pricing | $0.0854 per Hour per vCPU | $0.0742 per Hour per vCPU |
Amazon EC2 G4ad AMD-based GPU instances
In December 2020, AWS released the Amazon EC2 G4ad instance subfamily — powered by AMD Radeon Pro V520 GPUs and second-generation AMD EPYC processors with up to 2.4 TB of local NVMe storage — that delivers up to 40% better price performance over comparable GPU-based instances for graphics intensive applications such as virtual workstations and game streaming.
In July 2021, AWS expanded the G4ad subfamily with the g4ad.xlarge and g4ad.2xlarge sizes, which are designed to be cost-effective for workloads that don’t need the high vCPU and system memory that current larger G4ad instance sizes offer — rounding out their AMD offering and providing the lowest cost GPU instance in the AWS Cloud.
When to use Amazon EC2 G4ad instances
G4ad instances are ideal for high performance graphic workloads with no dependency on NVIDIA libraries, which can benefit from the improved price and performance.
- Animation
- Remote graphics workstations
- Video transcoding
- Photo-realistic design
- Game streaming in the cloud
Amazon EC2 G4ad.xlarge and G4ad.2xlarge details and pricing options
API Name | g4ad.xlarge | g4ad.2xlarge |
Type | Single GPU VM | Single GPU VM |
Memory | 16.0 GiB | 32.0 GiB |
vCPUs | 4 vCPUs | 8 vCPUs |
Storage | 150 GB NVMe SSD | 300 GB NVMe SSD |
Network Performance | Up to 10 Gigabit | Up to 10 Gigabit |
Linux On-Demand pricing | $0.0946 per Hour per vCPU | $0.0676 per Hour per vCPU |
Linux Reserved pricing | $0.0568 per Hour per vCPU | $0.0406 per Hour per vCPU |
Linux Spot pricing | $0.0284 per Hour per vCPU | $0.0204 per Hour per vCPU |
Windows On-Demand pricing | $0.1406 per Hour per vCPU | $0.1136 per Hour per vCPU |
Windows Reserved pricing | $0.1028 per Hour per vCPU | $0.0866 per Hour per vCPU |
Windows Spot pricing | $0.0744 per Hour per vCPU | $0.0663 per Hour per vCPU |
* Prices shown are for the US East (Northern Virginia) AWS Region. Prices for reserved instances are for 1-year “Partial Upfront” payment option.
Amazon EC2 G4dn and G4ad product details and pricing
Instance | GPU | vCPU | Memory (GiB) | GPU Memory (GiB) | Instance Storage (GB) | Network Bandwidth (Gbps) | EBS Bandwidth (Mbps) | Linux On-Demand hourly rate for US East (N. Virginia) |
g4dn.xlarge | 1 (NVIDIA) | 4 (Intel) | 16 | 16 | 1 x 125 NVMe SSD | Up to 25 | Up to 3.5 | $0.53 |
g4dn.2xlarge | 1 (NVIDIA) | 8 (Intel) | 32 | 16 | 1 x 225 NVMe SSD | Up to 25 | Up to 3.5 | $0.75 |
g4dn.4xlarge | 1 (NVIDIA) | 16 (Intel) | 64 | 16 | 1 x 225 NVMe SSD | Up to 25 | 4.8 | $1.20 |
g4dn.8xlarge | 1 (NVIDIA) | 32 (Intel) | 128 | 16 | 1 x 900 NVMe SSD | 50 | 9.5 | $2.18 |
g4dn.12xlarge | 4 (NVIDIA) | 48 (Intel) | 192 | 64 | 1 x 900 NVMe SSD | 50 | 9.5 | $3.91 |
g4dn.16xlarge | 1 (NVIDIA) | 64 (Intel) | 256 | 16 | 1 x 900 NVMe SSD | 50 | 9.5 | $4.35 |
g4dn.metal | 8 (NVIDIA) | 96 (Intel) | 384 | 128 | 2 x 900 NVMe SSD | 100 | 19.0 | $7.82 |
g4ad.xlarge | 1 (AMD) | 4 (AMD) | 16 | 8 | 1 x 150 NVMe SSD | Up to 10 | Up to 3 | $0.38 |
g4ad.2xlarge | 1 (AMD) | 8 (AMD) | 32 | 8 | 1 x 300 NVMe SSD | Up to 10 | Up to 3 | $0.54 |
g4ad.4xlarge | 1 (AMD) | 16 (AMD) | 64 | 8 | 1 x 600 NVMe SSD | Up to 10 | Up to 3 | $0.87 |
g4ad.8xlarge | 2 (AMD) | 32 (AMD) | 128 | 16 | 1 x 1200 NVMe SSD | 15 | 3.0 | $1.73 |
g4ad.16xlarge | 4 (AMD) | 64 (AMD) | 256 | 32 | 1 x 2400 NVMe SSD | 25 | 6.0 | $3.47 |
G4dn and G4ad instances are available through the following AWS purchasing and discount options:
- On-Demand Instances
- Savings Plans
- Reserved Instances
- Spot Instances
Start optimizing your cloud costs today!
Connect with one of our cloud cost management specialists to learn how Anodot can help your organization control costs, optimize resources and reduce cloud waste.