Skip to content

refactor(docker): consolidate JVM options and improve dynamic memory computation#5933

Draft
balazs-szucs wants to merge 6 commits intoStirling-Tools:mainfrom
balazs-szucs:docker-stuff
Draft

refactor(docker): consolidate JVM options and improve dynamic memory computation#5933
balazs-szucs wants to merge 6 commits intoStirling-Tools:mainfrom
balazs-szucs:docker-stuff

Conversation

@balazs-szucs
Copy link
Collaborator

@balazs-szucs balazs-szucs commented Mar 13, 2026

Closes: #5866

Description of Changes


Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have tested my changes locally. Refer to the Testing Guide for more details.

…computation

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Copilot AI review requested due to automatic review settings March 13, 2026 16:03
@stirlingbot stirlingbot bot added Docker Pull requests that update Docker code refactor Code changes that neither fix a bug nor add a feature labels Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the container startup/JVM configuration to consolidate JVM option selection into a single _JVM_OPTS source and adjusts dynamic JVM memory percentage computation in init-without-ocr.sh.

Changes:

  • Simplified dynamic memory computation (removed profile-based branches; adjusted Initial/Max RAM % for mid/large containers).
  • Consolidated JVM option selection to JAVA_BASE_OPTS > _JVM_OPTS > fallback defaults, and added dynamic ConcGCThreads sizing based on CPU count.
  • Updated embedded Docker images to set a single _JVM_OPTS (Shenandoah generational) instead of balanced/performance profiles.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
scripts/init-without-ocr.sh Removes profile-based selection, tweaks memory sizing, adds CPU-based ConcGCThreads, consolidates JVM option sourcing.
docker/embedded/Dockerfile.ultra-lite Replaces profile env vars with single _JVM_OPTS default.
docker/embedded/Dockerfile.fat Replaces profile env vars with single _JVM_OPTS default (currently has a malformed flag string).
docker/embedded/Dockerfile Replaces profile env vars with single _JVM_OPTS default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
@dosubot dosubot bot added the size:M This PR changes 30-99 lines ignoring generated files. label Mar 13, 2026
balazs-szucs and others added 3 commits March 13, 2026 17:56
@balazs-szucs
Copy link
Collaborator Author

/deploypr

@stirlingbot stirlingbot bot added Gradle Pull requests that update Gradle code pr-deployed Pull request has been deployed to a test environment labels Mar 14, 2026
@stirlingbot
Copy link
Contributor

stirlingbot bot commented Mar 14, 2026

🚀 PR Test Deployment

Your PR has been deployed for testing!

🔗 Test URL: http://23.22.230.180:5933
Security Disabled

This deployment will be automatically cleaned up when the PR is closed.

@balazs-szucs balazs-szucs marked this pull request as draft March 14, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docker Pull requests that update Docker code Gradle Pull requests that update Gradle code pr-deployed Pull request has been deployed to a test environment refactor Code changes that neither fix a bug nor add a feature size:M This PR changes 30-99 lines ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: v2.6.0 Increased Memory Usage Instead of Decrease

3 participants