lakekeeper: Unresponsive During High-Volume Data Ingestion
Summary
When attempting to ingest a large volume of data (~3 million records per second), lakekeeper becomes unresponsive (it seems lakekeeper is stuck like not doing anything) while my data ingestor is waiting for lakekeeper to respond.
During these tests, the logs show repeated messages like the one below (meantime data was getting ingested)
{"timestamp":"2024-12-05T07:35:23.518967Z","level":"INFO","message":"No task found","target":"iceberg_catalog::implementations::postgres::task_queues::tabular_expiration_queue","filename":"crates/iceberg-catalog/src/implementations/postgres/task_queues/tabular_expiration_queue.rs","line_number":118,"span":{"name":"pick_new_task"},"spans":[{"name":"pick_new_task"}]}
however, we have seen many logs like the below one which caused the ingestor apps to slowly reduce the amount of data ingested per second (or even for newly deployed ingestor apps, to simply wait for the lakekeeper to reply)
{"timestamp":"2024-12-04T12:38:22.815238Z","level":"WARN","message":"acquired connection, but time to acquire exceeded slow threshold","aquired_after_secs":5.125707121,"slow_acquire_threshold_secs":2.0,"target":"sqlx::pool::acquire","filename":"/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.8.2/src/pool/inner.rs","line_number":308,"span":{"method":"POST","request_id":"2de3d474cf90ba29b84023183cc38540","uri":"/catalog/v1/9ef83972-b237-11ef-8ad7-a7d83451cc2d/namespaces/testing-full-load-v5/tables/my-table","version":"HTTP/1.1","name":"request"},"spans":[{"method":"POST","request_id":"2de3d474cf90ba29b84023183cc38540","uri":"/catalog/v1/9ef83972-b237-11ef-8ad7-a7d83451cc2d/namespaces/testing-full-load-v5/tables/my-table","version":"HTTP/1.1","name":"request"}]}
From a resource perspective, lakekeeper pod is using almost no CPU and memory.
Configuration
We are deploying lakekeeper using the helm chart version 0.1.3 with the following custom values
catalog:
replicas: 1
resources:
limits:
cpu: 1
memory: 4Gi
requests:
cpu: 500m
memory: 2Gi
config:
ICEBERG_REST__PG_READ_POOL_CONNECTIONS: 100
ICEBERG_REST__PG_WRITE_POOL_CONNECTIONS: 100
ICEBERG_REST__PG_CONNECTION_MAX_LIFETIME: 60
The storage used is minio (deployed a cluster using the https://min.io/docs/minio/kubernetes/upstream/index.html) and the warehouse is created as follows
{
"warehouse-name": "demo",
"project-id": "00000000-0000-0000-0000-000000000000",
"storage-profile": {
"type": "s3",
"bucket": "my-bucket",
"key-prefix": "shared-minio",
"assume-role-arn": null,
"endpoint": "http://shared.storage.svc.cluster.local:9000",
"region": "us-east-1",
"path-style-access": true,
"flavor": "minio",
"sts-enabled": true
},
"storage-credential": {
"type": "s3",
"credential-type": "access-key",
"aws-access-key-id": "my-user",
"aws-secret-access-key": "my-pass"
}
}
Test
Providing more context about the test we carried on where we face this unresponsive issue.
There are a bunch of pods that ingest data from Kafka to Iceberg. The issue described above got faced at around 1500 tables and just over 2 million msgs per second. The ingestor pods check if each table exists, and commit to every table (that contains any new data) every 120s.
We aim for around 3600 tables at least, in the long run even more. Msgs per second, we would like to at least go above 5 mil msg/second. I would roughly estimate that 1 msg is ~ 0.2 kb, which would mean something like 400 MB per second.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
@c-thiel thanks for carrying out that test.
Take the time you need, we will use the new helm chart version when it is ready next week.