<@U04S8PLJWMT> how i can optimize sync time for mo...
# ask-ai
a
@kapa.ai how i can optimize sync time for mongodb to clickhouse • Sync succeeded • 14.25 MB • | • 12,446 records loaded • | • 34m 7s • Oct 14, 2025, 6:59 AM • • • • • Sync succeeded • 436.71 MB • | • 221,720 records loaded • | • 36m 52s • Oct 14, 2025, 6:21 AM • • • Sync succeeded • 56.48 MB • | • 32,782 records loaded • | • 33m 1s • Oct 14, 2025, 5:43 AM • • Sync succeeded • 30.05 MB • | • 20,111 records loaded • | • 28m 33s • Oct 14, 2025, 5:08 AM • Sync succeeded • 4.7 GB • | • 3,443,959 records loaded • | • 1h 28m 24s
k
To optimize sync time for MongoDB to ClickHouse in Airbyte, consider the following strategies based on the available documentation and community discussions: ### 1. Use the Latest Connector Versions and Airbyte Platform - Airbyte has made significant speed improvements in recent versions. Make sure you are using Airbyte version 1.8 or later, and the latest MongoDB and ClickHouse connectors, as these support the "faster sync speed" initiative, which can make syncs 4–10x faster for supported connectors. Both MongoDB (as a source) and ClickHouse (as a destination) are included in the connectors that benefit from these improvements, provided you are on the latest versions and Airbyte platform release [Faster sync speed](https://docs.airbyte.com/integrations/speed-improvements) [What connectors use faster speed](https://docs.airbyte.com/integrations/speed-improvements#what-connectors-use-faster-speed). ### 2. Resource Allocation - Ensure your Airbyte deployment has sufficient CPU and memory. If you are running Airbyte on Kubernetes or Docker, you can increase the resource limits for the sync jobs (e.g.,
JOB_MAIN_CONTAINER_CPU_REQUEST
,
JOB_MAIN_CONTAINER_MEMORY_REQUEST
). However, community feedback suggests that simply increasing these values may not always yield linear improvements if the bottleneck is elsewhere (e.g., network, source/destination performance) [Forum: Scaling Issues](https://discuss.airbyte.io/t/3726). ### 3. Identify and Address Bottlenecks - Use monitoring tools to check if the bottleneck is on the source (MongoDB), destination (ClickHouse), or network. For example, if CPU and memory usage are low during syncs, the bottleneck may be in connector configuration or network throughput rather than compute resources [Forum: Sync performance](https://discuss.airbyte.io/t/1578). ### 4. Optimize MongoDB Source Performance - For large collections, ensure your MongoDB Oplog is sized to retain enough history for incremental syncs, especially if syncs are infrequent. If the Oplog is too small, you may encounter issues that force full re-syncs, which are much slower [MongoDB V2 Troubleshooting](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations). - Use a dedicated read-only user with access only to the necessary collections to minimize overhead [MongoDB V2 Source](https://docs.airbyte.com/integrations/sources/mongodb-v2). ### 5. Optimize ClickHouse Destination Performance - Use the new ClickHouse destination (not the deprecated v1) for better performance, full schema typing, and support for all sync modes [ClickHouse Destination](https://docs.airbyte.com/integrations/destinations/clickhouse). - Ensure your ClickHouse instance is properly sized and network connectivity is optimized. ### 6. Tune Advanced Connector Settings - For MongoDB, you can adjust advanced settings such as the "Size of the queue" and "Discovery Sample Size" to better match your workload, but be cautious as these can impact memory usage [MongoDB V2 Configuration](https://docs.airbyte.com/integrations/sources/mongodb-v2#configuration-parameters). ### 7. Filter Unnecessary Data - Use Airbyte's row filtering and field selection features to reduce the amount of data being transferred, which can significantly speed up syncs if you only need a subset of the data [Filter rows](https://docs.airbyte.com/platform/using-airbyte/mappings#filter-rows). ### 8. Infrastructure Considerations - If self-hosted, use high-performance CPUs for your Airbyte nodes, as benchmarks show significant speedups with better hardware [Faster sync speed](https://docs.airbyte.com/integrations/speed-improvements). --- Summary: Upgrade to the latest Airbyte and connector versions, allocate sufficient resources, monitor for bottlenecks, optimize MongoDB and ClickHouse configurations, and filter unnecessary data. If you are already following these steps and still see slow syncs, the bottleneck may be inherent to the current connector implementation or your infrastructure, and further improvements may depend on future Airbyte releases.