Migrating to New AWS Graviton Processors

AWS Graviton processors are custom built by Amazon Web Services using 64-bit Arm Neoverse cores. Per AWS documentation, they deliver better price and performance over the intel based i86 chips. There have been performance tests showing 40% improvement over Intel cores, but the ARM chips cost 20% left. A link to one blog post demonstrating this will be provided below.

Currently, I host several web servers running Intel-based, so naturally, I wanted to migrate these workloads to the Gravitation chips. This turned out not to as straightforward as I thought. Here are my experience and things to check before you start the migration process.

First Attempt.

The servers were AWS EC2 instances running WordPress. I took a snapshot of the root volume since you can create an AMI (Amazon Machine Image) from a snapshot. I took this approach as you cannot select an ARM instance for an Intel-based AMI. However, you can choose the ARM architecture when you are creating an AMI from a snapshot.

Steps Taken

  1. Take a snapshot of the root volume of EC2 Instance
  2. Create an image from the snapshot, selecting ARM as the architecture.
  3. Start and ARM-based instance from the image just created

Results:

  • EC2 instance started and passed the system reachability status check.
  • EC2 instance failed the instance reachability status check, so it could not connect to SSH, System Manager, or EC2 Console.

What was wrong and how to fix it:

I did not review the ARM-based instances’ requirements and neglected to verify that the existing root drive/server was configured with those requirements.

Here are the requirements:

  • ENA (Enhanced Networking) must be installed and enabled
  • EC2 instance must be booted using UEFI (Unified Extensible Firmware Interface)

The EC2 instance failed the second requirement as it was running legacy boot and the boot sequence was looking for UEFI based on the system log. Later in this post, I will give you the commands to check your current EC2 instances for the requirements, so you don’t repeat my mistake.

How did I migrate to ARM?

  1.  I stood up the base Ubuntu 18.04 image from the AWS official images making sure to select the ARM-based image.  This will ensure the instance met the ARM requirements and I would not run into other conflicts down the line. Now I have a base image that can be used going forward to convert the remaining servers to ARM Graviton Processors.
  2. I configured the server with all the requirements based and configuration to run WordPress (Apache, PHP, etc) .
  3. I browsed the URL to make sure I got the WordPress install screen, Which I did.
  4. I copied the WordPress source directory to the new server.
    1. You can use FTP,  a plugin, or S3 copy command whichever is your preference

I will have a follow-up post that will review performance and pricing differences.

References mentioned in the post.

Price and Performance Comparison

Allan Denot has a post comparing ARM vs Intel (DNX Labs)
at this link

https://dev.to/dnx/arm-vs-intel-a-real-world-comparison-using-ec2-2kme

Check if an is booted using UEFI or Legacy Boot using Bash

# [ -d /sys/firmware/efi ] && echo “UEFI Boot Detected” || echo “Legacy BIOS Boot Detected”

Check if you AWS EC2 instance has ENA enabled

aws ec2 describe-images –image-id ami_id –query “Images[].EnaSupport”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »