05. The future of computing could be ARM (only) and you are already part of it 👀!
Before we get to the meat of the article and a demo let’s revise some computer science. Also while this article sometimes oversimplifies computer science behind the subject at hand, it is somewhat deliberate. And for more advanced readers I have provided links at the bottom.
Generally computing platforms we use, can be divided into following categories
- Mobiles - people using apps, taking pictures etc.
- Laptops and Desktops - browsing, building and using applications
- Servers - hosting applications and databases etc.
- High performance Computing / Super computers - Genomics, weather forecasting etc.
Each one of these devices is driven predominantly by a CPU / microprocessor (in addition to other things of course).
And these CPUs run applications as a set of machine instructions, where everything that an app (e.g. say a chrome browser on an android phone) wants to do, is translated into the machine instruction (eventually) for the processor to run.
So based on the instruction set that these microprocessors support, broadly they are further classified into two camps
With me until now? all right then, hang on - the things are going to get a bit complex from here.
Let’s take an example, So your CPU (e.g. in desktop or mobile) is rated at say 2.3 GHz. That means it has 2,300,000,000 cycles per second. Or simply 2.3 billion opportunities to execute instructions. Bigger the number here, the faster a processor is.
Now there are two types of Instruction Set Architectures (ISAs).
- One that has complex instructions requiring more clock cycles to execute
- One that has simpler instructions requiring fewer (usually closer to 1) clock cycles to execute
The first ISA is also known as a CISC (Complex Instruction Set Computer) and most - if not all Intel and AMD processors follow this. This is also referred to as x86 and x86-64 family of processors.
These (CISC processors) power most of the desktops and servers (including those in cloud) today.
The second is known as RISC (Reduced Instruction Set Computer) architecture and all ARM based processors follow this architecture.
These (RISC processors) power almost every mobile phone and tablet today.
Also an important side note -
ARM (Advanced RISC Machines) is a company that designed the RISC instruction set for ARM processors and licenses it to several companies to make actual ARM based processors e.g. Qualcomm, Mediatek and Samsung (Exynos range of processors) etc.
On the other hand, x86 and x86-64 are instruction sets designed by Intel and AMD. And as of now it is not licensed outside these two companies. Making them the only chipmakers that make and sell the CPUs that power most - if not all of the internet.
Before we go deeper, how does it matter to you ?
If you are using any smartphone - you are already using an ARM processor. And if you are using the internet (which of course you are), you are being serviced by a server running an x86 or X-86-64 processor. Your laptop most certainly using another one of Intel / AMD processors which again is CISC / x86 / x86-64 type processor.
So pretty even right ? everything mobile and tablet is ARM and everything laptop and above (desktop, servers etc) is x86.
But that might soon change. And that’s the point of this article.
For most of the CPU history. x86 has been a dominant player in laptop/desktop and server computing and ARM is the king of mobile computing.
Let’s see what changed recently.
- Apple came up with M1 which is ARM based SOC (System on Chip) CPU for Laptops and it is crazy good. Beating most if not all of the Intel and AMD powered CPUs in its class by a mile. It is extremely energy efficient offering up to 2 times battery life.
- Not so recently AWS - the cloud services provider giant came up with their ARM based graviton EC2 instances providing the best price performance for cloud workloads - upto 45% better than x86 based EC2 instances. So Graviton EC2 instances perform better at lower costs compared to equivalent x86 based EC2 instances!
- Recently Microsoft followed AWS’s lead to start their journey towards bringing ARM powered servers to their cloud service
So ARM is making headways into both desktop / laptop and server market! According to James Hamilton VP and Distinguished engineer @AWS -
A new era has begun
Soon ARM could become the dominant chip architecture for all computing needs. It already rules the mobile and embedded market and It can soon take over the server and the desktop market. And did you know that the word’s fastest supercomputer is already ARM based ?
Now I have a demo aligned for you where we are going to do following
- Spin up 2 EC2 instances one powered by x86 processor and another a graviton viz. ARM based instance
- We are going to use Amazon Linux AMI (Machine Image) for both
- We are going to install Java, Python3 and Node.js on both of them
- We are going to run same set of Java, Python and Node.js applications on top of both of these
And in the process we would have created a setup (on graviton) which provides much better price performance and with exactly the same set of steps and more importantly the codebase.
Imagine having to change nothing on your applications but being able to run them more efficiently on Graviton based EC2 instances at MUCH lower costs compared to similarly sized x86 based instances. Just like that!
If you did that for 100s of instances for your org reducing 1000s of dollars worth of cloud costs, You could really shine in your appraisal :)
Anyways, here goes the demo!
Video - Demo | Switch to Graviton | Save AWS Costs with Better Performance
Please watch in full screen or on youtube directly
Runtimes installation instructions used in the video
#Common sudo yum update -y #Java sudo yum install -y java-1.8.0-openjdk-devel # Node.js curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash # Python sudo yum install python3
Thank you for reading through, please comment and share with those who need this article!
Links for additional reading - https://www.reddit.com/r/AskEngineers/comments/qyd50/what_makes_the_arm_architecture_more_energy/