Most often when I see examples on setting the Java heap size using -Xms
and -xmx
JVM parameters people use powers of two:
128m, 512m, 1024m, etc.
Is there actually a reason for this? Is this beneficial to the JVM performance in some way? Or is this simply done because programmers tend to like powers of 2? (Or because the default value is 64m?)
P.S.
Of course I know that you can use essentially any number you want (-Xmx666
). But people tend to use powers of 2.