Skip to content

perf : optimize gms startup#16241

Open
Dutt23 wants to merge 2 commits intomasterfrom
sd/optimise_start_up
Open

perf : optimize gms startup#16241
Dutt23 wants to merge 2 commits intomasterfrom
sd/optimise_start_up

Conversation

@Dutt23
Copy link
Contributor

@Dutt23 Dutt23 commented Feb 17, 2026

Adds WAR extraction to tmpfs (RAM disk) for 15-30% faster startup. Bypasses OverlayFS overhead by extracting to RAM before class loading. Uses Spring Boot's classpath.idx for deterministic,
ordered class loading across boots.

Changes

Docker (docker/datahub-gms/start.sh)

  • Added production-ready logging with WAR size and available RAM checks
  • Warns if WAR > 1Gi (tmpfs limit) or RAM < 500MB
  • Extracts WAR to /tmp/gms/extaction when EXTRACT_JAR_ENABLED=true
  • Uses Spring's classpath.idx to build deterministic, ordered classpath

Kubernetes Helm Chart

  • Added extractJarEnabled: false flag to values.yaml (disabled by default)
  • Added conditional tmpfs emptyDir volume (1Gi, Memory-backed) in deployment.yaml
  • Added EXTRACT_JAR_ENABLED environment variable to container spec
  • Added conditional volumeMount at /tmp/gms/extaction

Why This Matters

OverlayFS (Docker/K8s default) adds copy-on-write overhead to every JAR class load. Extracting to tmpfs bypasses this layer traversal entirely:

  • Traditional: Read WAR from OverlayFS → decompress nested JARs → extract classes (slow)
  • Optimized: Extract to RAM once → load classes directly (fast)

Performance

  • Startup time local : 15-30% faster (30-35s → 16-18s on local)
  • Startup time deployment : (34-36 -> 28-30s) In deployments we have a bunch of tasks running on bootstrap loader causes interference.
  • Class loading: 2-3× faster via RAM + deterministic classpath ordering
  • Consistency: Eliminates OverlayFS cache variance for predictable SLAs
  • Memory: Temporary +150-300MB (freed after startup)

Requirements

  • Spring Boot 3.2+ (for classpath.idx support)
  • 8GB+ available cluster RAM
  • WAR file < 500MB (default 1Gi tmpfs limit)

Startup Output

[STARTUP] JAR extraction enabled. WAR size: 561MB, Available RAM: 3578MB
[STARTUP] Extracting WAR to tmpfs: /tmp/gms/extraction
[STARTUP] WAR extracted in 768ms
[STARTUP] Generating deterministic classpath from BOOT-INF/classpath.idx
[STARTUP] Deterministic classpath: 660 entries (from classpath.idx)

See docs/jar-extraction-tmpfs-optimization.md for detailed documentation.

@github-actions github-actions bot added docs Issues and Improvements to docs devops PR or Issue related to DataHub backend & deployment labels Feb 17, 2026
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Feb 17, 2026
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Feb 17, 2026

✅ Meticulous spotted 0 visual differences across 1008 screens tested: view results.

Meticulous evaluated ~8 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit 39fcac7. This comment will update as new commits are pushed.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Bundle Report

Bundle size has no change ✅

1 similar comment
@codecov
Copy link

codecov bot commented Feb 17, 2026

Bundle Report

Bundle size has no change ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment docs Issues and Improvements to docs needs-review Label for PRs that need review from a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments