Am 04.01.2018 um 18:20 schrieb Christopher Schultz:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Ambica,

On 1/4/18 11:17 AM, Sanka, Ambica wrote:
I am seeing below highlighted errors in native_err logs in all my
tomcat applications. I also increased memory for the VM from 4GB to
8GB. Still seeing those. When do we get that errors? I am reading
online that when program asks for memory and java cannot give,
that's when we see them. Please suggest. Java HotSpot(TM) 64-Bit
Server VM (25.20-b23) for linux-amd64 JRE (1.8.0_20-b26), built on
Jul 30 2014 13:13:52 by "java_re" with gcc 4.3.0 20080428 (Red Hat
4.3.0-8) Memory: 4k page, physical 8061572k(2564740k free), swap
4063228k(4063228k free)

CommandLine flags: -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/apache/ancillariesmonitoring/logs/
-XX:InitialHeapSize=128985152 -XX:MaxHeapSize=268435456
-XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+UseCompressedClassPointers
-XX:+UseCompressedOops -XX:+UseParallelGC

Others have commented on those messages you received, but nobody
mentioned your heap configuration. In the above command-line
arguments, you have specified both the minimum and maximum heap
memory. You have expressed those values in bytes which makes it
somewhat hard to read what they actually are, but this is what you

I *think* the JVM top line in GC output always shows bytes, even if you were using other units in the original switches.

have in readable units:

- -XX:InitialHeapSize=128M -XX:MaxHeapSize=256M

but yes, that is a valid point!

So you aren't using an 8GiB heap. You aren't even using a 4GiB heap.
You are using a 256 *megabyte* heap. If you really want an 8GiB heap,
you'll need to set it properly in your command-line arguments.

Note that setting the initial heap size to anything other than the
maximum heap size just makes the JVM take longer to get the heap
generations sized appropriately. For a long-running server process, I
think it never makes any sense to set initial < max heap size. Always
set them to the same value so that the heap itself does not have to be
expanded/resized during heap allocations.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to