64bit

Máquina Virtual de Java de 32/64-bit

Generalmente, los Sistema Operativos (SO) con arquitectura de 32bits, no pueden crear una instancia de Java mayor a 4Gb de RAM (límite por apuntadores de memoria), sin embargo algunos SO’s pueden tener límites menores como 2Gb y 3Gb.

Por otra parte, una instancia de Java en una arquitectura 64-bit, configurada de tal manera que pueda aprovecharlos, puede asignar memoria ilimitada. En mi experiencia, con una arquitectura SPARC y 64Gb en RAM, los parámetros de inicialición de java “-server -d64″, he podido instanciar hasta 36Gb de memoria.

The reason we need a contiguous memory region for the heap is that we have a bunch of side data structures that are indexed by (scaled) offsets from the start of the heap. For example, we track object reference updates with a “card mark array” that has one byte for each 512 bytes of heap. When we store a reference in the heap we have to mark the corresponding byte in the card mark array. We right shift the destination address of the store and use that to index the card mark array.

Fun addressing arithmetic games you can’t do in Java that you get to play in C++. Usually we don’t have trouble getting modest contiguous regions (up to about 1.5GB on Windohs, up to about 3.8GB on Solaris. YMMV). On Windohs, the problem is mostly that there are some libraries that get loaded before the JVM starts up that break up the address space. Using the /3GB switch won’t rebase those libraries, so they are still a problem for us.We know how to make chunked heaps, but there would be some overhead to using them. We have more requests for faster storage management than we do for larger heaps in the 32-bit JVM. If you really want large heaps, switch to the 64-bit JVM. We still need contiguous memory, but it’s much easier to get in a 64-bit address space.

¿Qué versión de compilados posees? Sencillo, basta con ejecutar el siguiente comando:

32bits

java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

64-bit

java -d64 -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

Más información. Java Tuning Paper

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">