Start a conversation

Use Provisioning in DynamoDB

Opportunity Name:

Use Provisioning in DynamoDB

 

AWS Resource Type:

DynamoDB

 

Opportunity Description:

Save money by converting DynamoDB tables from on-demand mode to provisioned capacity mode.

 

Criteria for identifying the opportunity:

For each on-demand DynamoDB table with non-zero usage costs, the FF analyzes the ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits CloudWatch metrics for the last 30 days to determine if the costs would have been lower if provisioned capacity had been used instead.

 

The FF calculates the lowest number of read and write capacity units that would have been required to avoid AWS applying any throttling (“provisioned throughput exceeded” exceptions) on reads/writes to the table, taking into account burst capacity to handle any usage spikes.

 

Specifically, we use the following algorithm to identify the minimum percentile of the current read/write capacity units that are needed:

  • Use CloudWatch to collect metrics for the sum of the consumed read capacity units and the sum of the consumed write capacity units over 5-minute intervals for the past 30 days.
  • Starting at 100% and decreasing in steps of 0.1%, calculate the percentile values of the read capacity units and write capacity units.
  • For each percentile value, iterate through the consumed read and write capacity units for each five-minute interval and calculate burst capacity usage.  We assume that a burst capacity buffer starts with the maximum of 300 seconds of provisioned capacity.  Any usage above the provisioned capacity subtracts from the burst capacity buffer, and any usage below the provisioned capacity is added back to the burst capacity buffer.
  • If the burst capacity reaches 0, we capture a throughput-exceeded event.  The goal is to choose the lowest percentile values of the current read/write capacity unit usage that do not generate any throughput-exceeded events.

If the number of provisioned capacity units identified by the above algorithm would have cost less than the on-demand capacity over the last 30 days, then the FF creates an opportunity for the DynamoDB table.

 

Potential savings (range in % on annual basis):

Savings depend on specific customer configurations, but experience shows that this approach can reduce DynamoDB capacity costs by approximately 40%.

 

What happens when the Fixer is executed?

  • Use the DynamoDB UpdateTable API to configure provisioned capacity:
  • BillingMode is updated to PROVISIONED
  • ProvisionedThroughput setting is configured as follows:
    • ReadCapacityUnits - set to the required RCU capacity to handle historic demand without any throttling.
    • WriteCapacityUnits - set to the required WCU capacity to handle historic demand without any throttling.

 

Is it possible to rollback once CloudFix implements the fixer?

Yes, CloudFix will monitor DynamoDB throttling exceptions and use them to revert the table to the original configuration automatically.

 

Can CloudFix implement the fix automatically once I accept the recommendation?

Yes.

 

Does this fix require downtime?

No.

 

Additional Resources:

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments