简体   繁体   English

SubGit Java堆空间

[英]SubGit Java Heap Space

While running SubGit I'm finding that the default Heap Size isn't adjustable, as I'm basically running: 在运行SubGit时,我发现默认的堆大小是不可调整的,因为我基本上在运行:

subgit install foo.git

With the settings contained therein. 包含其中的设置。

When checking the max heapsize with jmap -heap {pid} I can see 5022Mb allocated - while I have 20Gb allocated to the VM. 当使用jmap -heap {pid} -heap jmap -heap {pid}检查最大堆大小时,我可以看到分配了5022Mb的内存,而我已经为VM分配了20Gb内存。

Same is true with java -XX:+PrintFlagsFinal -version | grep HeapSize java -XX:+PrintFlagsFinal -version | grep HeapSize也是如此 java -XX:+PrintFlagsFinal -version | grep HeapSize leading me to believe that Subgit is using the default Java Heap value. java -XX:+PrintFlagsFinal -version | grep HeapSize我相信Subgit使用的是默认Java Heap值。

As I'm in a VM, I need to adjust this dynamically. 在虚拟机中时,我需要动态调整它。

Is there a way to set SubGit heap size directly when launching the application? 启动应用程序时,是否可以直接设置SubGit堆大小? Or is there a way to update the default Java value? 还是有办法更新默认Java值?

Cheers 干杯

SubGit daemon's settings indeed cat be set in the configuration file by using "javaOptions" configuration options as Petr has mentioned. 确实可以通过使用Petr提到的“ javaOptions”配置选项在配置文件中设置SubGit守护程序的设置。 For example, for 512MB heap: 例如,对于512MB堆:

[daemon]
javaOptions = "-noverify -client -Djava.awt.headless=true -Djna.nosys=true -Xmx512m"

To add more memory to SubGit standalone executable (not daemon), edit SubGit launching script and change EXTRA_JVM_ARGUMENTS line, like: 要向SubGit独立可执行文件(而不是守护程序)添加更多内存,请编辑SubGit启动脚本并更改EXTRA_JVM_ARGUMENTS行,例如:

EXTRA_JVM_ARGUMENTS="-Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Djna.nosys=true -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate -Xmx512m"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM