- 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:
- 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.
- 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.
- 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.
- 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).
- Source container:
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.