Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i use more heap than 32 GB with compressed oops

I could understand that with compressed oops , we can only use 32 GB of RAM. Is there someway i can use more than that like by allocating 2 heap or something ?

Thanks Vineeth

like image 449
Vineeth Mohan Avatar asked Nov 25 '12 09:11

Vineeth Mohan


1 Answers

You can't have multiple heaps (you can have multiple JVMs though, which is called scaling out as opposed to scaling up).

JVM uses compressed object pointers automatically below 32 GiB of memory. If you understand how it works (dropping youngest three bits from each address as they are always 0 due to memory alignment) you'll understand that you can't go further.

There is an interesting fact: once you exceed this 32 GiB border JVM will stop using compressed object pointers, effectively reducing the available memory. That means increasing your JVM heap above 32 GiB you must go way above. According to great Everything I Ever Learned about JVM Performance Tuning @twitter (around 13:00) presentation increasing heap from 32 GiB to anything below 48 GiB will actually decrease the amount of available memory (!) because compressed object pointers are no longer there.

like image 175
Tomasz Nurkiewicz Avatar answered Oct 23 '22 15:10

Tomasz Nurkiewicz