Area: Deployment
Sub-Area: Performance
Applies to: OSS + Cloud
Issue
DataHub is slow, has high latency, or degrades under load. This can affect UI responsiveness, API performance, and ingestion throughput.
You Might Be Asking
- How do I optimize DataHub performance?
- Why is the UI slow?
- How do I scale DataHub for large catalogs?
Cause
Performance depends on catalog size, query patterns and ingestion volume. The settings below apply only to self-hosted DataHub. Many tuning names that circulate for DataHub do not exist. The ones below do.
Solution
DataHub Cloud: You can't set GMS environment variables, Helm values or database settings. Contact DataHub Support with a description of the slowness, when it started and what was running (for example, a large ingestion).
Self-hosted: Quickstart (Docker) is not meant for production. The docs recommend Kubernetes with the Helm charts. The tested quickstart Docker allocation is 2 CPUs, 8GB RAM, 2GB swap and 13GB disk. See the quickstart guide.
1. Set replicas, JVM heap, extra env vars and resources in the DataHub chart
The datahub-gms, datahub-frontend and datahub-mce-consumer subcharts use these keys in values.yaml:
-
replicaCountfor the number of replicas. -
jvmOptsfor JVM settings, for example-Xmxvalues. -
extraEnvsfor extra environment variables. Entries are appended to the containerenv:. -
resourcesfor CPU and memory requests and limits.
Keys named replicas or an env: list are not the chart's keys. Check your chart's values.yaml for the exact layout. See the Kubernetes deployment guide.
Standalone MCE and MAE consumers are off by default (global.datahub_standalone_consumers_enabled: false). GMS consumes the Kafka topics itself. Scaling the datahub-mce-consumer subcharts does nothing unless you enable standalone consumers. Otherwise, scale GMS.
2. Tune search heap in the prerequisites chart
In the prerequisites chart, set the Elasticsearch heap with elasticsearch.esJavaOpts and the OpenSearch heap with opensearch.opensearchJavaOpts. OpenSearch is the enabled default in that chart version and Elasticsearch is disabled. Quickstart sets the search container heap with OPENSEARCH_JAVA_OPTS.
3. Tune GMS settings that exist
Set these through extraEnvs. See the environment variable reference.
-
EBEAN_MAX_CONNECTIONS: database connection pool size. Default 50.EBEAN_MIN_CONNECTIONSdefaults to 2. -
SEARCH_SERVICE_ENABLE_CACHE: search cache switch. Default false. Related settings areSEARCH_SERVICE_ENABLE_CACHE_EVICTION(default false) andSEARCH_SERVICE_CACHE_IMPLEMENTATION(default caffeine). -
CACHE_TTL_SECONDS: general cache TTL. Default 600.
4. Check Kafka processing lag
Search and graph indexes update from MetadataChangeLog (MCL) events. MCL hooks, including the UpdateIndicesHook, process them. Other hooks in the same consumer group can delay index updates, so check MCL as well as MetadataChangeProposal (MCP). Run:
datahub check get-kafka-consumer-offsets
It prints lag per consumer type (mcp, mcl, mcl-timeseries), group, topic and partition. See the CLI reference and the Kafka configuration guide.
5. Find the bottleneck with the right pod names
Run kubectl get pods -n <namespace> and copy the real names. With release name datahub, GMS pods look like datahub-datahub-gms-<hash> and prerequisite pods like prerequisites-kafka-0. Then run kubectl logs <pod name> -n <namespace> and kubectl top pods -n <namespace>.
On a MySQL metadata store, SHOW FULL PROCESSLIST; and SHOW ENGINE INNODB STATUS; show running queries and engine state.
6. Large exports
Search API paging stops at 10,000 results by default. For bulk reads, use scroll APIs such as GraphQL scrollAcrossEntities or the OpenAPI v3 scroll endpoint.