Source Oracle - Poor sync performance for high volume loads (>100 GB)

  • Is this your first time deploying Airbyte? No
  • OS Version / Instance: Ubuntu 20.04.4 LTS
  • Memory / Disk: 16 GB / 75 GB
  • Deployment: Docker
  • Airbyte Version: 0.40.18
  • Source name/version: Oracle DB (0.3.21) and Oracle Custom Source
  • Destination name/version: S3 (0.3.17)
  • Step: during sync

I’ve been working with Airbyte lately using it to load some data from Oracle to S3. For low volume tables (less than 1GB) it works fine, but I’ve faced some performance problems with high volume tables.

All tests I’ve done have been with a 242 GB table. First, I tried to set a connection using the Oracle DB source connector and the sync took 59h 53m 40s to finish (1.391 rows/s). Although it finished successfully, it took too much time comparing it with a custom code I made some months ago which I want to replace with Airbyte. My custom code usually takes less than 11h with the same load.

Second test I did was making a custom source connector using oracle_cx Python library to fetch data because I thought that the bottleneck was the Oracle DB source connector. However, it did not improve the throughput of the sync (1.346 rows/s). I did more tests changing some config:

  • Increasing connection’s CPUs (request and limit) and memory (request and limit) to the maximum (considering the server resources). I did not see much an improvement.
  • Changing S3 output format (JSON, CSV, Parquet and Avro). JSON output format was the fastest, although the difference between the 4 formats was not remarkable.
  • Using ThreadPools in my Oracle source custom connector. It improved a little bit the performance, but not as much as I was expecting.
  • Changing destination to Local JSON to see if the bottleneck was with the S3 destination connector. However, sync throughput went down to 1.216 rows/s.

After all the testing I have some insights/assumptions I would like to share:

  1. Source connector is taking more time sending data to destination connector than fetching data from Oracle. As I can see with the logs of my custom connector each fetch of 300.000 rows takes about 30 seconds but sending fetched data using a loop and generating an AirbyteMessage object for each row takes a little more than 3 minutes.
  2. Destination connector is taking more time reading data from source connector than uploading objects to S3. As I stated above, setting Local JSON as destination connector did not improve the performance of the sync, which makes me think that uploading objects to S3 is not the bottleneck.
  3. As it can be seen at the log, for each 1.000 rows a message is printed showing that those 1.000 rows have been read. For a table containing 300M of rows as it is my case, 300k log messages are printed at the end of the sync. I imagine that this can impact the sync performance.
  4. Looking at docker stats it seems that both containers (source and destination) are not using all given resources:
    • Source container:
      • Resources: 2 CPUs and 4 GB (RAM)
      • Usage: about 100% CPU and less than 400 MB (RAM).
    • Destination container:
      • Resources: 2 CPUs and 4 GB (RAM)
      • Usage: about 30% CPU and less than 800 MB (RAM).

To conclude, I have some questions:

  • Have I done something wrong in any step or the throughput I got is the one expected?
  • Is there any way to parallelize a single sync in multiple source and destination containers?
  • Is there any opened issue about performance that I have missed? Or do you have any task in your roadmap about this topic?
  • Is there a way to modify the log verbosity to decrease the total number of logs shown in each sync?

Sorry for the long post and thank you in advance.

3 Likes

Hello Oriol, it’s been a while without an update from us. Are you still having problems or did you find a solution?

Hello. I’ve been working with Oriol on the same project for a while using Airbyte. We still have the same issues with performance. Could you please help us?

We would like to know if it is a common limit with this tool or we are doing something wrong :smiling_face_with_tear:

Hello @marcosmarxm, as @daniel-gomez-mng stated some days ago, we are still blocked with this issue. We have not been successful trying to improve performance for high volume loads with any of the tests we did…

Is there any related issue that we can follow up? Thanks!

We have similar issues with a far smaller table (10GB/200m rows) We get around 5000 rows/s when syncing a table through Airbyte and about 90k rows/s when doing a CTAS with Trino, both set up on K8.

According to 🎉 JDBC source: adjust streaming query fetch size dynamically by tuliren · Pull Request #12400 · airbytehq/airbyte · GitHub the # of rows should be dynamically adjusted with the memory allocated, but we’ve tried to adjust it according to Scaling Airbyte | Airbyte Documentation without seeing any improvement.