Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding JVM Better [closed]

Tags:

jvm

I want to know the internals of the JVM, how it performs and the details that matters. Can you suggest any resource or best book available for this ??

like image 771
dinsim Avatar asked Mar 06 '09 03:03

dinsim


People also ask

Which JVM is fastest?

For the typical (median) values, there is no significant difference between the various JDKs except for OpenJDK 11 which is about 30% slower than the other versions. The fastest of them all is GraalVM EE 17, but the difference compared to OpenJDK 8/OpenJDK 17 is marginal.

How much memory should I allocate to JVM?

When allocating memory to a JVM, 10% to 25% of the memory is for the JVM process itself and the remainder is for the code running in the JVM. This means that a JVM that has been allocated 4 GB may only have 3.5 GB available to the code running in the JVM. This resource memory used by the JVM is often called overhead.

Why is JVM so powerful?

The Java Virtual Machine allows you to write highly secure programs using built-in security features. It keeps Java programs from interacting with Operating System (OS) resources directly. Security policy settings in the JVM can be configured for specific needs.


2 Answers

Most of what I know of the JVM comes from the Sun docs. They have some great whitepapers on the HotSpot VM: http://java.sun.com/javase/technologies/hotspot/index.jsp

You mentioned performance, so maybe you would be interested in the Sun performance docs: http://java.sun.com/docs/performance/

For a more hands on approach, try looking at Kaffe. This will show you what a virtual machine does, but not necessarily how Java code works in Sun's JVM:

Kaffe is a clean room implementation of the Java virtual machine, plus the associated class libraries needed to provide a Java runtime environment.

And the OpenJDK is a great place to learn about how the Java Platform is implemented: http://openjdk.java.net/

like image 155
Kai Avatar answered Sep 28 '22 03:09

Kai


Chapters from "Inside the Java 2 Virtual Machine":

http://www.artima.com/insidejvm/ed2/index.html

"Under the Hood" articles by Bill Venners

http://www.artima.com/underthehood/index.html

There's also "Jasmin", an assember for JVM, if you want to get your hands dirty and try low level programming with the JVM.

http://jasmin.sourceforge.net/

like image 33
maxyfc Avatar answered Sep 28 '22 04:09

maxyfc