When businesses first transition to the cloud, they often prioritize performance and speed above all else. After all, the cloud is an exciting new world full of nearly unlimited resources ripe for the taking.
Sooner or later, however, businesses must face the fact that speed and power come at a high financial price, and sometimes their original choices are not sustainable from a cost standpoint.
On the other side of the coin, companies that have recently experienced explosive growth may reach a point where even their largest and most powerful instances can no longer keep up with demands.
Regardless of which way you arrive at it, eventually your company will reach the conclusion that some adjustments are needed. These adjustments to instance size, speed, computing power, memory, and network usage are known as “rightsizing” — as in, resizing each instance to the proper level for your current needs.
While rightsizing instances appears to be a simple concept, in practice you’ll probably encounter a few confusing decisions between points A and B. Steven O’Dwyer from ProsperOps was kind enough to offer his expertise on clearing up the gray areas and breaking the process down into manageable chunks.
1. Monitor Your Resource Usage Over Time
Before you begin to make changes, you must understand where you’re starting from and where you want to go. To do this, you’ll need to monitor your current resources closely.
You’ll need a specialized tool to take a peek under the hood at what’s going on with your improperly sized instances. AWS offers an optional tool to help with this, but for the most detailed insights we recommend our own CloudZero Advisor.
It’s free, convenient, and can help you work toward answering the following questions:
- Are your instances too heavily taxed, or do they have resources sitting idle for too long?
- Which performance areas — computing power, network usage, memory, etc. — do not seem to be proportioned optimally for your needs?
- Would it be better to keep your current instance and make it larger or smaller? Or should you open up an entirely new instance and run it in addition to the first?
You likely won’t have perfectly formed answers to all of the above questions at this early stage, but it’s wise to keep them in mind as you progress through the following steps. As you answer each question one by one, you’ll get one step closer to finding your ideal solution.
2. Understand There Will Be Trade-Offs For Any Decision You Make
Unfortunately, there are costs for both underprovisioning and overprovisioning resources.
If you underestimate the resources you’ll need to complete the tasks at hand, you risk maxing those resources out and throttling your performance. Whereas if you overestimate your needs, you’ll wind up paying for additional resources that may not get used. Striking a balance between these two scenarios isn’t always easy.
Depending on the priorities of your company, you might want to safely err on one side over the other.
For instance, if you notice during the course of your monitoring that a particular instance’s CPU utilization sits at 50% most of the time, you could probably get away with transitioning to a smaller instance size to save some money.
However, it’s important to remember your company’s unique patterns of demand. Some businesses may have very low usage most of the time but occasionally experience huge spikes in user demand.
Engineers may prefer to provision resources with these peaks in mind to make sure that the performance will be there when customers need it.
3. Decide Between Vertical And Horizontal Scaling
Vertical scaling is when you make an instance larger or smaller to fit the current demand more closely. Horizontal scaling happens when you open or close one or multiple instances running parallel to each other.
If you plan to rely on an auto-scaler rather than adjusting your instances manually, it’s important to know that the decision between horizontal and vertical scaling may be made for you.
That’s because most auto-scalers typically use horizontal scaling. They may sense that a particular resource is overburdened and open up a second instance of the same type to handle the extra load.
This move is often temporary; when the load has passed and the extra instances are no longer needed, the auto-scaler can close down idle resources.
While automated horizontal scaling does save some time and effort, it could cost you more in the long run than manually selecting instances for vertical scaling.
In most cases, switching to a larger size of an instance costs less than opening up an entirely new instance to run alongside the first. It’s another trade-off you’ll have to decide for yourself.
4. Run A Proof Of Concept Test
Depending on whether your instance appears to be under- or overburdened, the next step is to try running all the instance’s current workloads on a smaller or larger instance.
However, before you make any major changes — even if you plan to use an auto-scaler — you’ll want to make sure your adjustments will actually accomplish what you expect them to.
First, create an image of the instance. This image should contain a copy of all the instance’s settings, user credentials, and other configurations that keep workloads running optimally.
Next, load the image onto your new larger or smaller instance. The workloads should run according to the original settings you copied.
Now you can monitor the performance of each workload and make sure that scaling the original instance up or down is actually the right move. Watch your compute, memory, and network usage to make sure each can meet the requirements for delivering uninterrupted service to your customers.
5. Continue To Monitor Your Performance
It’s a fact of doing business that circumstances and demand always fluctuate. If your business is in the entertainment industry, for example, what worked well during the summer may not be optimal during winter months.
Though you may have been able to downsize and cut costs while your user base spent the warmer months outside, you’ll likely need to scale back up once people hunker down to stream TV shows and play games for the winter.
Periods of growth, market changes, demographic shifts, and even the release of new cloud options can all affect your rightsizing choices in the future. Therefore, your work is never truly finished when it comes to monitoring and making adjustments.
6. If You Use An Auto-Scaler Or Other Automated Monitoring Software, Pay Attention To Your Settings
Rather than keep an eagle eye on your performance metrics at all times, it can be helpful to set up automated alerts. You can often set thresholds that let you know if resource usage falls below or rises above certain thresholds.
Armed with that knowledge, you can make rightsizing adjustments as needed and keep your performance and cost efficiency in a balance that works well for your company’s needs.
CloudZero Gives You The Tools To Optimize Instances Efficiently
Without the right platform, you’ll have a tough time gauging with any degree of accuracy whether a given instance is overloaded or underused.
CloudZero Advisor allows you to compare each of your AWS services and the resources they use.
Not only can you compare and contrast compute, network, memory, and performance for your instances, you can actually receive advice about how to optimize your services for better cost efficiency.