Rikin Baghadiya
Rikin Baghadiya

Reputation: 1

High Memory Usage after migrating from Java 8 to Java 17

Our java Application is deployed in AWS Infra on EC2.

Application running JVM Options - -Xmx51g -Xms24g -Xmn5g. with java 8 during start of the application it was using approx 30g but when migrated to 17 it's starts using complete 51g given as max heap.

GC algo used in java 8 was CMS and with java 17 it's using default G1GC.

can anyone help what could be issue here - is it java 17 with g1gc use this huge memory or it's not freeing up any memory? As if this is using 51g at the start of application not sure with huge request load what can happen?

I tried with different memory option so one observation when I reduce my XMX values it stays within that limit - it means whatever I am giving as XMX it starts using it.

tried some of the option for G1GC to free up memory like -XX:G1PeriodicGCInterval=* -XX:-G1PeriodicGCInvokesConcurrent but seems it's not helping.

Upvotes: 0

Views: 273

Answers (0)

Related Questions