0

While running SubGit I'm finding that the default Heap Size isn't adjustable, as I'm basically running:

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.

Same is true with java -XX:+PrintFlagsFinal -version | grep HeapSize leading me to believe that Subgit is using the default Java Heap value.

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? Or is there a way to update the default Java value?

Cheers

2

1 Answer 1

2

SubGit daemon's settings indeed cat be set in the configuration file by using "javaOptions" configuration options as Petr has mentioned. For example, for 512MB heap:

[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:

EXTRA_JVM_ARGUMENTS="-Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Djna.nosys=true -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate -Xmx512m"
3
  • in the default defined config I do not actually have the javaOptions var set at all. If I define a javaOptions there, do I need to add all the default options as well? Or just the one I would require? e.g.. javaOptions = -xmx512m or the full string as above?
    – itChi
    Oct 16, 2018 at 13:41
  • yes, the default options should be added as well, so it should be the whole string.
    – ildar.hm
    Oct 17, 2018 at 12:48
  • Using the options above, I now get GC overhead limit exceeded. This is using -Xmx8g -XX:-UseGCOverheadLimit
    – itChi
    Oct 25, 2018 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.