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

itChi
  • 642
  • 6
  • 19
  • 1
    I assume you saw https://subgit.com/documentation/config-options.html and the two `javaOptions` configuration options in there? – Petr Janeček Oct 15 '18 at 16:46
  • 1
    Yes I did, got confused as I didn't have `javaOptions` predefined. If only I looked out for `[daemon]` instead... – itChi Oct 16 '18 at 13:43

1 Answers1

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"
ildar.hm
  • 526
  • 2
  • 5
  • 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 '18 at 13:41
  • yes, the default options should be added as well, so it should be the whole string. – ildar.hm Oct 17 '18 at 12:48
  • Using the options above, I now get `GC overhead limit exceeded`. This is using `-Xmx8g -XX:-UseGCOverheadLimit` – itChi Oct 25 '18 at 12:24