- Newest
- Most votes
- Most comments
For an Amazon EMR cluster using EMRFS, terminating primary nodes is not a viable option for cost reduction while keeping the cluster functional. Primary nodes are essential for cluster management and run critical services like YARN ResourceManager and HDFS NameNode.
Instead, to minimize compute costs for your morning EMR tasks, I recommend the following approaches:
-
Use auto-termination policy: Configure your entire cluster to automatically terminate after a specified idle period. This ensures you don't pay for resources when the cluster is not processing data.
-
Create transient clusters: Set up your EMR cluster to terminate automatically after all steps complete. Since your task runs every morning and completion time isn't a priority, you can create a new cluster for each job execution rather than keeping it running continuously.
-
Continue terminating task nodes: Your current practice of terminating task nodes after task completion is good. Task nodes perform parallel computation but don't store data in HDFS, making them safe to terminate.
-
Consider multiple primary nodes for reliability: If you need high availability, Amazon EMR 5.23.0 and later allows you to launch clusters with three primary nodes to prevent single points of failure.
Since your data is stored in EMRFS (which uses Amazon S3), you can safely terminate the entire cluster after job completion without losing data. This approach, combined with your Savings Plan, would be the most cost-effective solution rather than attempting to terminate just the primary nodes while keeping the cluster alive.
Sources
Understand node types in Amazon EMR: primary, core, and task nodes - Amazon EMR
Control Amazon EMR cluster termination - Amazon EMR
Using an auto-termination policy for Amazon EMR cluster cleanup - Amazon EMR
Plan and configure primary nodes in your Amazon EMR cluster - Amazon EMR
answered a year ago
Relevant content
asked 3 years ago
