Skip to content

Conversation

@LegendPei
Copy link
Contributor

@LegendPei LegendPei commented Dec 17, 2025

Ⅰ. Describe what this PR did

根据当前内存值自动计算 JVM 参数(如 Xmx 和 Xms)
Automatically calculate the values for JVM parameters such as Xmx and Xms based on the current memory value

对于windows只支持环境变量的内存分配,对于容器环境和虚拟机来说,4G的机器将采用70%,4G以上的则采用75%的内存
For Windows, only memory allocation through environment variables is supported. For container environments and virtual machines, 70% of memory will be used for machines with 4GB of memory, and 75% for those with more than 4GB

Ⅱ. Does this pull request fix one issue?

#7836

Ⅲ. Why don't you add test cases (unit test/integration test)?

对于windows的改动:支持通过环境变量来设置内存,当然也保留了原先的默认值
For changes to Windows: It now supports setting memory through environment variables, while also retaining the original default values

win改后

对于容器环境 For container environments:

  1. 2G
2g
  1. 8G
8g
  1. 用户设置环境变量时 When users set environment variables
设置
  1. 最低内存下限(目前设置的是256m) Minimum memory limit (currently set at 256m)
下限

对于虚拟机 For virtual machines:

  1. 当用户设置了环境变量时 When users set environment variables
屏幕截图 2025-12-17 204016
  1. 没有设置时,采用自动计算 When not set, automatic calculation is used
屏幕截图 2025-12-17 203758

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.07%. Comparing base (b27e6be) to head (59ada69).

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7872      +/-   ##
============================================
+ Coverage     71.03%   71.07%   +0.04%     
  Complexity      797      797              
============================================
  Files          1294     1294              
  Lines         49528    49528              
  Branches       5873     5873              
============================================
+ Hits          35182    35203      +21     
+ Misses        11437    11414      -23     
- Partials       2909     2911       +2     

see 12 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant