Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jvm heap setting pattern

Tags:

java

memory

jvm

I have observed while setting heap size people prefer the values 64,128,256,1024.. . If I give a value in- between these numbers (say 500), won't the JVM accept that value? Why these numbers are important and preferred? Why we also upgrade RAM in this pattern?

Please help me to understand.

like image 215
Habin Avatar asked Jul 13 '12 07:07

Habin


1 Answers

JVM will accept any value, no problem with that. Using 2^n values is just a "convention", using others will have no negative effect in practice.

like image 98
Alexey A. Avatar answered Sep 24 '22 08:09

Alexey A.