Skip to content

Performance between EKS running fargate and EKS running EC2 nodegroup

0

I am deploying trino application on aws eks with 2 different deployments:

  • Deployment 1: EKS EC2 nodegroup for coordinator and worker.

  • Deployment 2: EKS Fargate. (AWS STS Regional endpoints using regional).

When I execute the same SQL query, I notice that the query on trino running EC2 nodegroup runs twice as fast as trino running on EKS fargate (both clusters have the same configuration, same resource definition)

My question is why is there such a big difference in performance between EC2 nodegroup and fargate when running on EKS?

asked 2 years ago485 views

1 Answer
0

The performance difference you're observing between EKS running on EC2 nodegroups and EKS on Fargate can be attributed to several factors:

  1. Resource allocation: While Fargate provides more granular resource allocation (as small as 0.25 vCPU and 0.5GB of memory), EC2 instances often have more powerful and consistent hardware. This can lead to better performance for compute-intensive tasks like those in Trino.

  2. Networking: Fargate pods share network namespaces within a task, which can impact network performance. EC2 instances, on the other hand, have dedicated network interfaces and can potentially offer better network throughput.

  3. Storage access: EC2 instances may have better access to local storage or optimized storage configurations, which can significantly impact query performance in database applications like Trino.

  4. Overhead: Fargate abstracts away the underlying infrastructure, which can introduce some overhead compared to running directly on EC2 instances.

  5. Optimization: EC2 instances allow for more fine-tuned optimizations at the host level, which may not be possible with Fargate's abstracted environment.

  6. Constant load performance: Fargate is designed for variable workloads and may not perform as well under constant, high-load scenarios compared to properly sized EC2 instances.

It's important to note that while Fargate offers benefits in terms of ease of management and scalability, it may not always provide the same level of performance as EC2 instances for all workloads. For performance-critical applications like Trino, especially those with constant high loads, using EC2 nodegroups might be more suitable. However, the trade-off is that you'll need to manage the underlying infrastructure yourself.
Sources
Benchmarks from DigitalRoute for Achieving Cost Savings with Serverless and AWS Graviton | AWS Partner Network (APN) Blog
AWS Fargate security considerations - Amazon Elastic Container Service
Run Serverless Kubernetes Pods Using Amazon EKS and AWS Fargate

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.