geecon_logo2009
left_sepimageright_sep
speaker details
Waldemar Kot
Waldek Kot is passionate about Java and middleware technologies. Currently works as a Principal Systems Engineer at Oracle Polska, which he joined as a result of BEA Systems acquisition in late 2008. Waldek advises customers in Central and Eastern Europe about use of middleware technologies for their application development, SOA, EDA and BPM projects. He focuses on application development and integration technologies, Java Enterprise Edition, Spring, but also telecom-oriented middleware related to IMS (IP Multimedia Subsystem), like SIP, SIP Servlet and telecom web services. Waldek is also an active member of Java community in Poland. When not discussing about technology, he spends most of the time with his family in Warsaw. From time to time Waldek shares fun about technology on his blog.

lecture

Liberate your enterprise Java applications from the Operating System (or: about the JVM-level virtualization)

Virtualization is one of the hottest topics in today's data centers. Virtualization technologies offer additional flexibility to the ways computing resources are organized and managed - with clear goal of improving efficiency and availability of those resources. Here, the virtualization is understood as "the ability to run multiple virtual machines on a single physical machine". The virtual machines dynamically share resources (CPU, memory, I/O, storage, etc.) of that single physical machine. Such understood, virtualization requires adding a new layer - a hypervisor, which is a piece of software running on top of the hardware, hosting the virtual machines. To the software running inside the virtual machine (e.g. operating system), it appears like a "normal" computer. Hypervisor allows running multiple virtual machines simultaneusly.

This approach allows very fast (and cost-efficient) provisioning of new (nearly identical) machines, simply by cloning (copying) them. Virtualization also opens up new interesting possibilities, like ability to perform live migration of virtual machines across physical computers in a way which is undetectable to the users of the applications running inside the migrated virtual machine...

OK - but what it has to do with enterprise Java ? Well, virtualization brings the same flexibility and dynamism to Java workloads. Even more - virtualization gives ability to run the Java Virtual Machine on a hypervisor, without a standard OS, i.e. directly on the virtualized hardware.

Eliminating the OS from the virtual machine significantly frees up resources (like CPU, memory and disk space) of the physical machine, allowing it to be even better utilized (e.g. improving performance of the currently running virtual machines or allowing running even more virtual machines inside the same physical box).

But how is that possible ? Well, the fact is, that especially for server-side Java applications (like Java EE apps running inside application servers), the JVM almost does not need the operating system ! Only very small part of OS (some say, no more than 0.5% of the OS codebase) is actually used by the JVM for such applications - mainly functionality related to I/O (networking, disk storage), low-level memory and thread management and monitoring/administration tools. The rest of the tasks is anyway handled by the JVM itself - or by the hypervisor in virtualized environments. What's worse - very often, the OS negatively influences execution of Java applications, because it has no knowledge of what is going on internally inside the JVM (leading for example to uncoordinated paging of memory by the OS affecting garbage collection process being performed by the JVM). This negative effect is sometimes called "double" or even "triple virtualization", with redundant, uncoordinated activities performed by the JVM, the OS and the hypervisor.

So, why not to get rid of the bloated OS if it is not needed by the JVM anyway ? Well, why not to go even further and make the JVM hypervisor-aware (i.e. "cooperate" with it), so even more advanced optimizations could be possible ? Work on exactly this kind of innovation in Java world has been going on for a few years now and resulted in JRockit Virtual Edition technology, which is standard JVM (Oracle/BEA JRockit) with ability to run without operating system, directly on top of hypervisors like the Xen-based OracleVM. By "standard" JVM I mean that the JRockit itself has not been modified to run virtualized - the magic ingredient here is thin (~2MB) layer of code just above the hypervisor. Layer (called "bare metal"), which makes the JVM "think" that it is running on top of a standard OS (of course, also all the Java applications running within such JVM - even such complex Java applications like Java EE application server - are not aware that there is no standard OS under the JVM). This thin layer of code provides just those of OS features which a JVM really needs ("the missing 0.5%") - particularly for server-side Java applications.

During the session we will cover aspects of virtualization, esp. how it influences Java and enterprise application development, deployment and management. We also demonstrate the JRockit Virtual Edition JVM technology and innovations it brings to the Java world.

sponsors