Why it matters
Task nodes are often the largest part of an EMR cluster’s EC2 cost, and moving them to Spot does not put the cluster’s data at risk.How nOps finds it
nOps reads the last 7 complete days of EC2 billing for instances tagged as EMR task nodes, per EMR cluster. The saving is the on-demand task node cost, scaled to a month, times your own Spot discount for each instance type and region, measured from your billed Linux Spot and on-demand rates (at least 24 Spot hours in the last 20 days). Clusters with no Spot rate of your own, clusters whose task nodes already run mostly on Spot or are mostly covered by commitments, and savings under $25 a month are left out. The EMR service charge is not counted.Before you start
Jobs that tolerate losing task nodes, and permission to change the cluster’s instance groups or fleets, or its launch template.How to implement
- Confirm the jobs on the cluster can tolerate task nodes being reclaimed.
- For a running cluster, add a task instance group or fleet with Spot capacity and shrink the on-demand task group.
- For clusters created per run, change the cluster definition: set the task instance fleet’s target Spot capacity, use several instance types, and choose the price-capacity-optimized allocation strategy.
- Keep primary and core nodes on demand.
- Update the definition in your orchestration tool, Terraform or CloudFormation.
Risks and considerations
- Spot task nodes can be reclaimed, which can make jobs run longer.
- Do not move core nodes to Spot: they hold HDFS data.
- To roll back, switch the task group or fleet back to on-demand capacity.
FAQs
Why does nOps need my own Spot rate?
Why does nOps need my own Spot rate?
Spot prices vary by instance type and region. nOps only estimates the saving from the Spot rates you are actually billed, so the figure reflects your prices.