LegendPei opened a new pull request, #7872:
URL: https://github.com/apache/incubator-seata/pull/7872

   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing 
guidelines -->
   
   - [ ] I have read the 
[CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md)
 guidelines.
   - [ ] I have registered the PR 
[changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. 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?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes 
#97. -->
   #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
   
   <img width="2697" height="396" alt="win改后" 
src="https://github.com/user-attachments/assets/63920871-65f9-47a1-ad16-54fd1b17dab4";
 />
   
   对于容器环境   For container environments:
   1. 2G
   
   <img width="1946" height="572" alt="2g" 
src="https://github.com/user-attachments/assets/938aa7a0-820d-4021-b3b7-2ab427f329bb";
 />
   
   2. 8G
   
   <img width="1944" height="572" alt="8g" 
src="https://github.com/user-attachments/assets/bd618ab8-fd8b-4772-a870-678b0ba7c1c2";
 />
   
   3. 用户设置环境变量时  When users set environment variables
   
   <img width="1936" height="579" alt="设置" 
src="https://github.com/user-attachments/assets/a7c5d98d-50d2-49d8-9b1f-c71fb18f6c98";
 />
   
   4. 最低内存下限(目前设置的是256m)   Minimum memory limit (currently set at 256m)
   
   <img width="1932" height="493" alt="下限" 
src="https://github.com/user-attachments/assets/00e4015f-2641-49dc-8f59-45935f2ed524";
 />
   
   对于虚拟机    For virtual machines:
   
   1. 当用户设置了环境变量时    When users set environment variables
   
   <img width="1953" height="565" alt="屏幕截图 2025-12-17 204016" 
src="https://github.com/user-attachments/assets/c9a71f1f-ed2c-4ae3-b70d-5971bfcbfbbb";
 />
   
   2. 没有设置时,采用自动计算    When not set, automatic calculation is used
   
   <img width="2129" height="617" alt="屏幕截图 2025-12-17 203758" 
src="https://github.com/user-attachments/assets/04c16fae-3a28-4ad5-8728-b7f1a5d59854";
 />
   
   
   ### Ⅳ. Describe how to verify it
   
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to