Skip to content

Releases: instana/java-buildpack-memory-calculator

Ratio for young generation memory in heap

02 Feb 11:01
Compare
Choose a tag to compare

In applications that should optimise for minor garbage collection (which is most of the cloud-based one in my experience), it is useful to set the -Xmn to fix how much memory can be allocated in the heap for young generation. This parameter usually makes sense a fraction of the total heap memory, so that allocating more memory to the surrounding container lets the memory allocated to young generation expand linearly with the total memory available to the heap.

This release introduces the --heap-young-generation-ratio, with default .3, that sets the -Xmn as a fraction of the memory allocated to the heap. If -Xmn is specifically passed as a JVM option, --heap-young-generation-ratio is ignored.

Ratio between Direct Memory and Heap

02 Feb 09:35
Compare
Choose a tag to compare

Applications that heavily use NIO, like the Instana Agent, sometimes benefit from more direct memory as the overall memory available to the JVM increases. This is because direct memory does not have, in itself, garbage collection, but rather it relies on APIs like Cleaner or other phantom reference-based ones to free direct memory as a consequence of evicting objects from heap (like ByteBuffers).

This release introduces a new option, --direct-memory-to-heap-ratio, which accepts a float like 0.3 and, in the absence of hard-coded -Xmx (max heap) and -XX:MaxDirectMemorySize (max direct memory), it splits the available memory (total memory available minus all the other memory areas and head room) to direct memory and heap.

Hello World!

02 Feb 09:22
Compare
Choose a tag to compare
1.0.0

Add commented-out targets for AIX