java - What is the largest possible heap size with a 64-bit JVM? -


the theoretical maximum heap value can set -xmx in 32-bit system of course 2^32 bytes, typically (see: understanding max jvm heap size - 32bit vs 64bit) 1 cannot use 4gb.

for 64-bit jvm running in 64-bit os on 64-bit machine, there limit besides theoretical limit of 2^64 bytes or 16 exabytes?

i know various reasons (mostly garbage collection), excessively large heaps might not wise, in light of reading servers terrabytes of ram, i'm wondering possible.

if want use 32-bit references, heap limited 32 gb.

however, if willing use 64-bit references, size limited os, 32-bit jvm. e.g. on windows 32-bit 1.2 1.5 gb.

note: want jvm heap fit main memory, ideally inside 1 numa region. that's 1 tb on bigger machines. if jvm spans numa regions memory access , gc in particular take longer. if jvm heap start swapping might take hours gc, or make machine unusable thrashes swap drive.

note: can access large direct memory , memory mapped sizes if use 32-bit references in heap. i.e. use above 32 gb.

compressed oops in hotspot jvm

compressed oops represent managed pointers (in many not places in jvm) 32-bit values must scaled factor of 8 , added 64-bit base address find object refer to. allows applications address 4 billion objects (not bytes), or heap size of 32gb. @ same time, data structure compactness competitive ilp32 mode.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -