Sub topic 6
What AWS Graviton is and when it fits
This chapter explains what AWS Graviton processors are, how Graviton instances differ from x86 instances, and how to decide which workloads should move. It assumes you know basic EC2 concepts (instances, instance types, AMIs), can use the AWS CLI, and have read the earlier chapters on measuring utilization and right-sizing. Checking software for Arm64 compatibility, building multi-architecture images, and benchmarking each have their own chapters. This one covers the decision of whether Graviton is worth considering.
What Graviton is
AWS Graviton is a family of server processors that AWS designs itself. They use the Arm64 instruction set, also called AArch64. Intel and AMD instances use x86-64. The two instruction sets are not binary compatible. A program compiled for x86-64 cannot run on Arm64, and the reverse is also true, unless it is interpreted, run in a managed runtime, or translated.
Several points about the design matter in practice:
- One physical core per vCPU. On most Intel and AMD instance types, a vCPU is a hardware thread, and two vCPUs share one physical core through simultaneous multithreading (SMT). On Graviton, each vCPU is a full physical core. A 4-vCPU Graviton instance therefore has four cores that do not compete with a sibling thread. This often helps throughput for CPU-bound and multithreaded work.
- Built on the Nitro System. Graviton instances use the same Nitro hypervisor and offload cards as current x86 instances. EBS, networking, security groups, IAM roles, and instance metadata work the same way.
- Generations. Graviton has been released in generations, such as Graviton2, Graviton3, and Graviton4. Each generation maps to instance families with a number in the name.
- Pricing. For a comparable size, Graviton instances usually have a lower hourly price than the equivalent x86 instance. AWS also claims better performance per watt. The size of the saving depends on the family, the Region, and the workload, so treat published figures as a starting hypothesis, not a result.
How to read Graviton instance names
An instance type name encodes the family, generation, and options. The letter g in the attribute position marks a Graviton processor.
| Instance type | Reading |
|---|---|
| `m7g.large` | General purpose (m), generation 7, Graviton (g), large size |
| `c7g.xlarge` | Compute optimized (c), generation 7, Graviton |
| `r7g.2xlarge` | Memory optimized (r), generation 7, Graviton |
| `m7i.large` | General purpose, generation 7, Intel (i) |
| `m7a.large` | General purpose, generation 7, AMD (a) |
Some older Graviton types do not follow the letter-g pattern as cleanly. For example, t4g is the burstable Graviton2 family, and a1 was the first-generation Arm instance. Check the instance type list instead of relying on the name alone.
You can list current-generation types that run on Arm64 with the CLI:
aws ec2 describe-instance-types \
--filters Name=processor-info.supported-architecture,Values=arm64 Name=current-generation,Values=true \
--query 'InstanceTypes[].InstanceType' \
--output textThe output is a single line of type names separated by tabs. The list changes as AWS releases new generations, so run it for the Region you plan to use.
The Graviton option in a right-sizing process
Graviton is a second, separate lever from right-sizing. Right-sizing changes how much compute you buy. A Graviton move changes which kind of compute you buy. Doing both at once makes it hard to know which change caused a result, so the order matters.
- Right-size on the current architecture, using utilization data.
- Pick a Graviton family that matches the right-sized profile.
- Test compatibility and price-performance.
- Roll out in stages.
The diagram shows this decision path.
When Graviton is a good fit
Graviton tends to work well when most of the following are true.
The software already runs on Arm64
Many popular runtimes and servers publish Arm64 builds. Examples include Linux distributions such as Amazon Linux 2023, Java and other JVM languages, Python, Node.js, Go, .NET, PHP, Ruby, NGINX, Apache, PostgreSQL, MySQL, Redis, and many container base images. Interpreted and managed-runtime code is the easiest case, because the runtime handles the instruction set. Your application code often needs no change at all.
The workload is scale-out and CPU-bound
Web and API servers, microservices, caching layers, data processing, batch jobs, and CI build fleets are common candidates. They run many copies of a stateless process, so they scale by adding instances, and the per-vCPU cost matters most. Because each Graviton vCPU is a full core, per-vCPU throughput on multithreaded work is often strong.
You can test and replace instances easily
Workloads managed by Auto Scaling groups, launch templates, or container orchestrators can mix architectures during a migration. Stateless services can be rolled back by shifting traffic. These properties make a staged move cheap.
The container or build pipeline is under your control
If you build the images or artifacts yourself, you can produce an Arm64 variant. If you only run vendor binaries, you depend on the vendor.
When Graviton is a poor fit
Some situations call for staying on x86, at least for now.
- x86-only binaries. Closed-source or legacy software shipped only as x86-64 executables cannot run natively. Running it through emulation is slow and is not a cost-saving strategy.
- Native dependencies with no Arm64 build. A Python wheel, Node native addon, or shared library that has no Arm64 package may need to compile from source, which can fail or slow your builds.
- Windows workloads. Standard Windows Server licensing and most Windows applications target x86. Check current AWS documentation before assuming Windows support.
- Hand-tuned x86 code. Code that uses x86 intrinsics (such as AVX-512 or SSE instructions) needs porting or a fallback path. Arm64 has its own vector extensions (NEON and SVE), but code must be written or built for them.
- Licensing tied to x86. Some commercial software licenses are specific to a platform or processor.
- Very small, low-traffic workloads. If a workload costs a few dollars a month, the engineering time to migrate can exceed years of savings.
- Workloads that depend on an x86-specific feature, such as certain GPU or accelerator pairings. Check the instance type's documentation for the exact specification.
> This list is about fit, not a ban. Several of these obstacles can be removed by replacing a dependency or asking a vendor for an Arm64 build.
Checking what you are running on
When a fleet has both architectures, you need a quick way to confirm what a host or container uses. The uname -m command reports the machine architecture.
uname -m
# x86_64 on Intel/AMD instances, aarch64 on Graviton instancesNote the naming difference. Linux reports Arm64 as aarch64, while Docker and many package tools call the same architecture arm64. Both names refer to the same thing, and mixing them up is a common cause of confusing error messages.
For a new instance, you must also pick an Arm64 AMI. An x86-64 AMI cannot launch on a Graviton instance type, and EC2 rejects the request. Amazon Linux publishes the latest image IDs through public SSM parameters:
aws ssm get-parameter \
--name /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64 \
--query 'Parameter.Value' \
--output textThe returned value is an AMI ID in your current Region. Use it in a launch template or run-instances call together with a Graviton instance type.
Common mistakes and edge cases
- Mismatched AMI and instance type. The most common launch error is choosing an x86-64 AMI for a Graviton type, or the reverse. EC2 reports an architecture mismatch. Always check the AMI's architecture field.
- Assuming the same size performs the same. An
m7g.xlargeand anm7i.xlargehave the same vCPU count and memory, but not the same performance. The Graviton instance could be faster or slower depending on the workload. This is why the later benchmarking chapter exists. - Skipping right-sizing. Moving an over-provisioned instance to Graviton gives a price cut, but you still pay for idle capacity. Right-size first, or at least measure the target's utilization so you pick the correct size on the new platform.
- Ignoring non-CPU limits. Network bandwidth, EBS throughput, and memory per vCPU vary by family. A CPU-bound match can still be limited by another resource.
- Treating a successful start as proof of compatibility. A program may start and then fail on a rarely used code path that loads an x86-only library. Test the full feature set, not only startup.
- Mixed fleets without tagging. If you run both architectures during a migration, tag instances or use separate Auto Scaling groups so that monitoring, patching, and cost reports can tell them apart.
- Forgetting capacity. A newer or less common instance type may have lower availability in a given Availability Zone. Spreading across several zones and allowing more than one type in an Auto Scaling group reduces the risk.
A practical assessment checklist
Before committing time to a migration, answer these questions for one workload:
- Which operating system, runtime, and version does it use, and does each publish Arm64 builds?
- Does it include native extensions, compiled libraries, or agents (monitoring, security, backup) that need Arm64 variants?
- How is it built and deployed: from source, from vendor binaries, or from container images?
- Can you run a second copy on a Graviton instance alongside production?
- What is the current monthly cost, and what share of it could realistically change?
- What is the rollback plan if the test fails?
If the answers are mostly positive, the workload is a good candidate for the next steps in this tutorial: a detailed compatibility check and a benchmark.
Summary of the decision
Graviton is a good fit for software that already supports Arm64, runs as a scale-out, CPU-bound service, and can be tested and rolled back easily. It is a poor fit for x86-only binaries, hand-tuned x86 code, and workloads where migration effort exceeds the saving. In every case, right-size first, then test, then decide.
Exercise
A team runs a stateless Java web API on twelve m6i.2xlarge instances. CloudWatch shows average CPU of 12 percent and a maximum of 30 percent. They want to move to Graviton. In what order should they act, and why? Also name one check they must do before launching a Graviton instance from their current launch template.
Show answer
First right-size on x86. The 12 percent average and 30 percent maximum suggest the instances are too large, so they should pick a smaller size (or fewer instances) using utilization data. Then choose an equivalent Graviton family such as m7g at the right-sized vCPU and memory, confirm that the JVM, libraries, and agents support Arm64, and benchmark price-performance. Doing the steps in this order separates the effect of the size change from the effect of the processor change. Before launching, they must replace the x86-64 AMI in the launch template with an Arm64 AMI (for example the Amazon Linux 2023 arm64 image from the public SSM parameter), because an x86-64 AMI cannot launch on a Graviton instance type.
Exercise
You log in to a host and run uname -m. It prints aarch64. What does that tell you, and which name would Docker use for the same architecture?
Show answer
The host runs on an Arm64 processor, which on EC2 means a Graviton instance. Docker and many package tools call the same architecture arm64.