yoka791
yoka791

Reputation: 656

Better memory consumption in java 10-12 than java 8?

I tried to run the same spring application on different java versions and the results are:
(java version: memory consumption)
java 8: 478MB
java 10: 386MB
java 12: 282MB
Is their better memory consumption in the high versions of java?

Upvotes: 0

Views: 543

Answers (1)

Anjana
Anjana

Reputation: 883

It would depend on the GC you are using.

In Java 9, G1 GC was made the default. You may check which GC you've used in Java 8 and other versions.

You can also improve the performance by configuring them using JVM flags. https://docs.oracle.com/cd/E21764_01/web.1111/e13814/jvm_tuning.htm#PERFM160

Upvotes: 1

Related Questions