<@U04S8PLJWMT> I've setup airbyte on ec2. Do I nee...
# ask-ai
k
@kapa.ai I've setup airbyte on ec2. Do I need to do anything to ensure that it is optimized to use all of the available memory/cpu? it's a beefy 16cpu, 64gb ram machine.
k
To ensure Airbyte is optimized to use all available memory and CPU on your EC2 instance (16 CPU, 64GB RAM), you should consider the following steps: 1. Configure Resource Limits Airbyte allows you to set instance-wide resource requests and limits for job containers. You can do this by setting the following environment variables (for Docker deployments, in your
.env
file; for Kubernetes, in your
values.yaml
):
Copy code
JOB_MAIN_CONTAINER_CPU_REQUEST=16    JOB_MAIN_CONTAINER_CPU_LIMIT=16    JOB_MAIN_CONTAINER_MEMORY_REQUEST=64g    JOB_MAIN_CONTAINER_MEMORY_LIMIT=64g
Use the
g
suffix for gigabytes (e.g.,
64g
). This ensures Airbyte jobs can request and use the full resources of your machine, but you may want to set these values lower if you want to reserve resources for the OS or other processes. For Docker Compose, the syntax is similar:
28g
for 28GB, etc. [Low memory footprint - how to set job main container memory parameters?](https://discuss.airbyte.io/t/1399) [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources) 2. Tune Number of Workers/Concurrent Jobs The number of concurrent syncs (workers) is a primary driver of resource usage. You can control this with environment variables such as
MAX_SYNC_WORKERS
and
MAX_CHECK_WORKERS
. For example, in your Docker Compose or Kubernetes values file:
Copy code
MAX_SYNC_WORKERS=8    MAX_CHECK_WORKERS=8
Adjust these based on your workload and monitor system utilization. More workers mean more parallel jobs, but also higher resource usage. [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte) 3. Monitor and Adjust Use infrastructure monitoring tools to track CPU and memory usage. If you see high resource usage or jobs getting stuck, you may need to increase limits or reduce the number of concurrent jobs. If you see low utilization, you can increase the number of workers or resource limits to speed up syncs. 4. Connector-Specific Tuning If certain connectors are more resource-intensive, you can override resource settings at the connector or connection level for finer control. See the documentation for details on how to do this via SQL or configuration files. [Configuring Connector Resources](https://docs.airbyte.com/platform/operator-guides/configuring-connector-resources) Note: - Airbyte jobs (especially syncs) can be memory-intensive, particularly for sources with large row sizes, as the source worker may buffer up to 10,000 records in memory. - If you experience unusual RAM usage by the Airbyte server itself (not just job containers), this may be a bug or memory leak, as reported by some users. Restarting the server can temporarily resolve this, but if the issue persists, consider opening a GitHub issue or monitoring for updates. [Unusual RAM usage by airbyte server](https://discuss.airbyte.io/t/2167) Summary: Set appropriate resource limits and worker counts, monitor usage, and adjust as needed. Airbyte is flexible, but optimal performance on a large machine requires explicit configuration to take full advantage of available resources.