terminal-recall icon indicating copy to clipboard operation
terminal-recall copied to clipboard

Excessive off-heap memory consumption

Open cjritola opened this issue 9 years ago • 3 comments

TRCL is eating too much memory, to the point of causing swapfile lag on a 4GB system even after the program is closed and is slowing development. Limiting heap size doesn't work because the issue appears to be off the Java heap.

As such, the JVM is not up-front as to what the real consumption source is: trcl-top trcl-heap

Possible causes:

  • Too many directly-allocated buffers (looking into this)
  • Excess off-heap memory usage by JOGAmp
  • Excess AMD OpenGL driver memory usage (this should register in Xorg, which is giving a reasonable 200MB under heavy use - and not Java) This used to be an issue but appears to be fixed with the new Omega driver(s).

It'd be nice if TRCL would someday actually use ~805MB of RAM* like VisualVM likes to claim it is (and what I specified it to use) instead of roughly double that.

*Recent memory optimizations mean this max heap size might be pushed down to 512MB in the future.

cjritola avatar Oct 11 '15 13:10 cjritola

It maxed at 1.199GB yet managed to push a 4GB linux system to swap.

Partial control. Off-heap is a lot sketchier but there are ways with JVM flags which are being tweaked now.

cjritola avatar Oct 12 '15 10:10 cjritola

Persists through JDK 8.

cjritola avatar Jun 27 '18 03:06 cjritola