LegendPei commented on issue #7836: URL: https://github.com/apache/incubator-seata/issues/7836#issuecomment-3626918164
> > 现在的distribution/bin/seata-setup.sh文件里面默认是令JVM_XMX:="2048m"的然后也可以支持JVM参数注入(PR [#5529](https://github.com/apache/incubator-seata/pull/5529)),意思是要修改一下.sh文件使得能自动获得环境的内存值然后根据某种规则来适配JVM参数吗?还是只是单纯的获得参数 > > The current distribution/bin/seata-setup.sh file sets JVM_XMX:="2048m" by default, 和 it also supports JVM parameter injection (PR [#5529](https://github.com/apache/incubator-seata/pull/5529)). Does this mean we need to modify the .sh file to automatically obtain the memory value of the environment and then adapt the JVM parameters according to some rules? Or is it just about obtaining the parameters > > 目前已经可以通过参数注入方式,但是这样不够灵活,当未设置对应参数时只能使用默认值。所以我们需要设计一个合理的xms和xmx以及堆外内存占用在不同内存规格下的百分比,比如4g以下堆内存占用70% 以上则是75%之类的,每个不同的规格有不同的算法占比。 > > Currently we can inject JVM parameters, but that approach isn’t flexible enough: if a specific parameter isn’t set we fall back to a fixed default. We therefore need a policy to calculate reasonable Xms/Xmx settings and off-heap (direct/native) memory shares based on the host’s total memory. For example, use a heap of about 70% of total RAM for machines under 4 GB and about 75% for larger machines. Each memory tier should have its own percentage or calculation rule so the JVM options are derived automatically and adapt to different instance sizes. 我想尝试一下,我现在的想法是通过修改seata-setup.sh文件来实现自动读取容器然后根据某些算法来分配使用的内存,当然优先使用用户输入的参数,并且加个是否使用“自动读取内存”的开关,然后我再在本地测试试验一下 I want to give it a try. My current idea is to modify the seata-setup.sh file to automatically read containers and then allocate the used memory based on certain algorithms. Of course, priority will be given to the parameters entered by the user. Additionally, I plan to add a switch to determine whether to use "automatic memory reading". After that, I will conduct some local tests -- 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]
