AWS Cloud Financial Management
AWS Compute Optimizer launches integration with application performance monitoring and observability partners
Today AWS Compute Optimizer launched the capability to integrate with several leading application performance management and observability partners: Datadog, Dynatrace, Instana, and New Relic. You now have multiple options for acquiring and including Amazon Elastic Compute Cloud (EC2) memory metrics in your EC2 rightsizing recommendations.
Background
AWS Compute Optimizer analyzes your AWS resource utilization data collected by Amazon CloudWatch from the past 14 days (paid option available for up to 3 months of data) to identify the optimal resource configuration for your Amazon EC2 instances, Amazon Elastic Block Store (EBS) volumes, AWS Auto Scaling groups, and AWS Lambda functions. Several metrics are available in CloudWatch to monitor Amazon EC2 performance. Compute Optimizer uses these metrics, such as CPU utilization, disk reads and writes, network utilization, and throughput to understand your virtual servers’ performance behavior with CPU, disk, and network. For certain metrics, such as memory utilization, you will need to install an additional agent, like the CloudWatch agent (read this user guide) on your Amazon EC2 instances, or leverage 3rd party Application Performance Monitoring (APM) solutions to collect more system-level metrics.
Capability enhancement
Memory metrics are an important part of compute instances rightsizing—many instance types offer different memory capacities, and the price difference between these options can impact an organization’s total bill. When memory metrics are present in Compute Optimizer, the total savings potential of the recommendations can be many times higher than without them.
Without memory utilization data, Compute Optimizer only considers instances that offer the same or more memory capacity; this reduces the number of instance types that can be considered for rightsizing. While this is a safe approach to ensure no rightsizing recommendation will impact the application performance, it does limit the cost savings potential. This further stresses the importance to use memory utilization data to unlock the full potential of rightsizing your EC2 environment.
“Organizations moving to the cloud often have limited visibility into their resource utilization, which makes provisioning the right amount of compute resources challenging,” said Yrieix Garnier, VP of Product at Datadog. “By integrating Datadog and AWS Compute Optimizer, customers can get better EC2 rightsizing recommendations by leveraging the memory utilization metrics provided as part of Datadog observability.”
“We are excited to partner with AWS to bring innovation to our joint customers,” said Steve Tack, SVP of product management at Dynatrace, “By extending Dynatrace AI to AWS Compute Optimizer, customers can now obtain a real-time view of their EC2 cloud memory usage against their resource allocation. This enables them to accelerate modernization while managing costs more effectively. This builds on Dynatrace’s existing ability to dynamically capture full stack application topology, dependency mapping, and utilization metrics to power intelligent cloud modernization at scale.”
EC2 rightsizing recommendation without memory data showed 33% savings. Due to the absence of memory data, recommendations won’t include the opportunity for potential reduction of memory capacity.
The same EC2 instance with memory metrics from Datadog influenced the rightsizing recommendation, resulting in 95% savings.
How it works
Engineering teams from both Compute Optimizer and observability partners worked together to build a data platform that allows you to view recommendations for your resources, regardless of your application monitoring preference. Each of the supported observability partners designed integrated “push” models to Compute Optimizer Kinesis Data Firehose streams that are scaled to handle gigabytes of data per second. Along with the existing CloudWatch data collected by Compute Optimizer, these external metrics are also fed into the recommendation engine to provide you with more intelligent and cost saving recommendations.
This design is a departure from the traditional pull model with calling public APIs using customer quotas to retrieve the required metric data. With this push data platform, the Compute Optimizer team built a scalable interface that APM providers can develop against. Integration with APM providers can be done consistently within minutes, all while creating a shared responsibility to deliver intelligent recommendations to our customers.
In order to enable metric ingestion from an APM partner, you can use the existing Compute Optimizer recommendation preferences API. Let’s walk through the integration flow using DataDog as an example:
Please note: it might take a few hours for these new CLI changes to propogate. If these API calls don’t work, check back in a bit!
Step 1. Call the preferences API with DataDog as a metric preference:
aws compute-optimizer put-recommendation-preferences --region us-east-1
--resource-type=Ec2Instance --scope='{"name":"AccountId", "value":"123456789012"}'
--external-metrics-preference='{"source":"Datadog"}'
This can also be configured directly in the console, or turned off, with a few simple clicks:
If, for example, you are a DataDog customer, you must also follow the Datadog configuration setup guide to opt-in to this feature. A link to the instructions on how to set this up will be provided in the preferences console as shown above.
Step 2. Verify that the external metric preference setting is active
aws compute-optimizer get-recommendation-preferences --region us-east-1
--resource-type=Ec2Instance
>
{
"nextToken": "false",
"recommendationPreferencesDetails": [
{
"enhancedInfrastructureMetrics": "Active",
"inferredWorkloadTypes": "Inactive",
"resourceType": "Ec2Instance",
"scope": {
"name": "AccountId",
"value": "123456789012"
},
"externalMetricsPreference": {
"source": "Datadog"
}
}
]
}
Step 3. Call the ‘get-ec2-instance-recommendations’ API to get DataDog powered recommendations
aws compute-optimizer get-ec2-instance-recommendations
>
{
"errors": [],
"instanceRecommendations": [
{
"accountId": "123456789012",
"currentInstanceType": "c4.large",
"currentPerformanceRisk": "Low",
"effectiveRecommendationPreferences": {
"externalMetricsPreference" {
"source":"Datadog"
}
},
"finding": "Underprovisioned",
"findingReasonCodes": [ "MemoryUnderprovisioned" ],
"instanceArn": "arn:aws:ec2:us-east-1:123456789012:instance/instance-arn",
"instanceName": "instance-arn",
"lookBackPeriodInDays": 14,
"recommendationOptions": [
{
"instanceType": "c4.xlarge",
"migrationEffort": "Low",
"performanceRisk": 2,
"platformDifferences": [ "NetworkInterface" ],
"projectedUtilizationMetrics": [
{
"name": "Memory",
"statistic ": "Average",
"value": 100
}
],
"rank": 1,
}
],
"recommendationSources": [
{
"recommendationSourceArn": "arn:aws:ec2:us-east-1:123456789012:instance/instance-arn",
"recommendationSourceType": "Ec2Instance"
}
],
"utilizationMetrics": [
{
"name": "Memory",
"statistic": "Average",
"value": 200
}
]
}
],
"nextToken": "null"
}
Note that it can take up to 30 hours to collect enough metrics from the APM partner to produce recommendations. Until the required data becomes available, Compute Optimizer will default to using CloudWatch metrics.
Launch Partners:
Conclusions
With the ability to ingest memory utilization data from your application performance management environments, you will receive more accurate EC2 rightsizing recommendations that result in higher cost savings. Let us know how we can continue improving the AWS Compute Optimizer recommendations and help you identify more performance improvement and cost saving opportunities.