Jvm tuning problem (young generation burst)

console keeps outputting:

[GC (Allocation Failure) [PSYoungGen: 338275K->4614K(341504K)] 
412867K->79382K(1040896K), 0.0107084 secs] 
[Times: user=0.01 sys=0.00, real=0.01 secs]

catalina.sh file is configured as follows:

JAVA_OPTS="-server -Xms1024m -Xmx2048m    
            -XX:+HeapDumpOnOutOfMemoryError 
            -XX:HeapDumpPath=/data/webSoft/tomcatLogs 
            -XX:+PrintGCDetails"
  • Server operating system: CentOS 6.8 64-bit
  • CPU: 2 core
  • Server memory: 8G

I heard that the memory is adjusted to physical memory 1ax 2, the maximum is the same as the minimum, and the younger generation is 3 br 8 of heap memory

so, try to increase the heap space and the size of the younger generation. The catalina.sh file is configured as follows:

JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xmn1536m "

but with egg, the value of [PSYoungGen: 338275K-> 4614K (341504K)] seems to be larger. The memory burst after a period of time, causing the tomcat to stop failing.

Mar.22,2021

I installed a jvm on linux to run the java program, but the java program runs very slowly and the CPU is very high. Have you ever encountered such a situation?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e994b3-174a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e994b3-174a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?