La presentazione di Oracle per l'evento Codemotion del 5 marzo 2011 a Roma http://www.codemotion.it/. Relatore Nino Guarnacci
I vantaggi di avere una java virtual machine che non ha bisogno di sistema operativo. Fare della propria applicazione una "appliance" tecnologico, sfruttando appieno le risorse hardware disponibili. Semplificare le procedure di configurazione e sicurezza degli ambienti applicativi. Garantire una completa trasportabilità del codice tra i diversi ambienti (fisico-virtuale). Massimizzare le performance attraverso la tecnologia Real-Time, Deterministic GC, minimizzando i costi di risorse e skill.
3. Why virtualization?
• Do more with less
– Utilization
– Improve IT staff productivity
– Maximize capacity
• Reduce costs (Improve TCO!)
– Faster product2market
• Migrate risks
– Easier to try out new ideas
• Accelerating business growth
– Quickly respond to changed business needs
sabato 5 marzo 2011
4. What is Virtualization?
• A process to abstracting hardware resources
– CPU, memory, hard disk etc
• Enables multiple OS and applications to share hardware
• What is a Virtual Machine?
– An isolated partition that runs an application stack
– Each Virtual Machine acts as running on their own real computer
sabato 5 marzo 2011
6. What is Virtualization?
Traditional deployment With Virtualization
App App App
App App App
App App App App App App
App App App
App App App
App App App App App App
App App App
App App App
App App App App App App
sabato 5 marzo 2011
7. What is Paravirtualization?
• When the guest OS is aware of the
virtualization
– Uses a special “API” the guest OS
– Simplifies hypervisor and OS implementation
– Theoretically higher performance
sabato 5 marzo 2011
9. What is a Hypervisor
• Software that virtualizes the hardware (and
resources)
• Makes it possible to run multiple OS instances (guest
OSs) on the same physical server
sabato 5 marzo 2011
10. How it works (simplified overview)
• The guest OS believes that it’s running on real
hardware
• All devices are “faked”
• All operations that are “dangerous” are trapped by the
hypervisor and emulated
– Device interaction
– Memory mapping
• The hypervisor provides an idealized view of a
machine
sabato 5 marzo 2011
12. What is an Appliance?
• A pre-configured system image
– Configured for a specific solution
– Includes all required functions
• Can run directly on a virtualization platform
sabato 5 marzo 2011
15. Java is the Most Popular Language in the World
sabato 5 marzo 2011
16. Product Definition: JRockit JVM
• JRockit is a JVM for enterprise wide usage
• 100% Java SE compatible
• JRockit is the High Performance JVM
• Maximizes throughput
• Optimized for server-side applications
• Full support of Oracle product stack
• Optimized for Oracle products like WebLogic Server
• Simpler and faster support
• Included free of charge in many Oracle Java based
products
sabato 5 marzo 2011
17. JRockit Real Time Benefits
• Guaranteed millisecond application response times
• Restrict GC pause times based on application SLA
• Lower development & maintenance costs
• Replace native code with Java
• Avoid costly JVM tuning
• Improve application performance & latency
• Performance on par with standard JRockit JVM!
• Use tools to identify & fix latency issues
• Expand use of Java to new areas
• Financial front office: trading, pricing, foreign exchange
• Telco core network: billing, IP telephony etc
• RFID, sensor networks, command & control, manufacturing
etc
sabato 5 marzo 2011
18. Managing Latency
Traditional Java
JRockit Real Time
During Low Load: GC spikes
and occasional timeouts visible
JRRT Makes garbage collection deterministic.
Allowing for the guarantee of SLAs.
During High Load: GC pauses can
result in unacceptable response times
sabato 5 marzo 2011
19. WLRT Deterministic GC - GC Pause Time
-Xgcprio:deterministic
-XpauseTarget=100ms
(miliseconds)
Pause time
Elapsed time (seconds)
sabato 5 marzo 2011
20. JRockit Throughput GC - GC Pause Time
-Xgcprio:throughput
(miliseconds)
Pause time
Elapsed time (seconds)
sabato 5 marzo 2011
21. JRockit Runtime Analyzer
• Tab that shows thread local area
(TLA) information.
• Ratio between the number of
bytes allocated by small and
large objects in the application.
• Possible to see how much
memory each thread has
allocated during the recording.
• Occupied Heap, that shows the
amount of memory after a
garbage collection, has been
added to GC Event Tab.
• Tab for code related information
that shows which packages and
classes the application spent the
most time executing.
• The packages showed are the
hottest packages
• ……
sabato 5 marzo 2011
22. Traditional Java Virtualization
Application Server
JVM
OS
Hypervisor
Hardware
• Triple virtualization
• Redundant activities in the lower layers
• Uncoordinated activities between upper & lower layers
• Opportunity to specialize to:
– Reduce memory footprint
– Improve performance
– Improve latency
– Improve security
sabato 5 marzo 2011
23. Traditional Java Virtualization
Application Server
JVM
Triple Virtualization OS
Hypervisor
Hardware
• Triple virtualization
• Redundant activities in the lower layers
• Uncoordinated activities between upper & lower layers
• Opportunity to specialize to:
– Reduce memory footprint
– Improve performance
– Improve latency
– Improve security
sabato 5 marzo 2011
24. Traditional Java Virtualization
Application Server
JVM
Triple Virtualization OS General purpose OS
Hypervisor
Hardware
• Triple virtualization
• Redundant activities in the lower layers
• Uncoordinated activities between upper & lower layers
• Opportunity to specialize to:
– Reduce memory footprint
– Improve performance
– Improve latency
– Improve security
sabato 5 marzo 2011
25. Long Term Goal
• Efficiently execute Java in a virtualized environment
• Take advantage of and work closely together with the
hypervisor
• Simplify management
• Reduce TCO (Total Cost of Ownership)
• Improve security
sabato 5 marzo 2011
26. Oracle JRockit Virtual Edition
Optimized Java Infrastructure
Traditional Virtualized Java
Execution Stack
WebLogic Server
Java Virtual Machine
Guest Operating System
Hypervisor
Bare Metal Hardware
sabato 5 marzo 2011
27. Oracle JRockit Virtual Edition
Optimized Java Infrastructure
• Runs natively on hypervisor
Optimized Java
• More efficient use of hardware Execution Stack
resources
• Higher density
• Better performance WebLogic Server
• Reduced operational cost
• Simpler patching Java Virtual Machine
JRockit Virtual Edition
• Improved security
Oracle VM
Hypervisor
• Custom Java appliances
• Building blocks for larger Bare Metal Hardware
assemblies
• Simple deployment
sabato 5 marzo 2011
28. JRVE is....
Java App
JRVE
Services
Java Directly Appliance
on Hypervisor JRockit JVM Tool
JRVE Kernel
JRVE Tools
(Java tools)
The OS functionality a JVM needs
sabato 5 marzo 2011
29. JRockit Virtual Edition
How does it work?
JRockit –VE OS Layer
TCP/IP File System
Scheduler H/W
JRockit Virtual Edition • TCP/IP: Network communication
• Scheduler: Runs Java threads. Single
JRockit –VE f process
• File System: Local [virtual] disk
Oracle VM
• HW: Hardware device interaction. Network
card, virtual screen, etc.
Bare Metal Hardware
sabato 5 marzo 2011
30. JRockitVE Kernel Technology Overview
From OS process to Java Service on Hypervisor
*nix-like emulation layer for Java
Java Application
• Not Linux-based
• Can run JRockit JVM for Linux
• Networking, thread-scheduling, JRockit JVM Local
Storage
memory management, file
storage JRockitVE Kernel
• NOT derived from Linux Hypervisor
Physical Machine
Not an OS in the normal sense
• Only a single JVM
• No paging
Networking
• No real device drivers
Remote Storage
sabato 5 marzo 2011
31. Shorter Path length for I/O
Oracle VM
Normal OS
I/O time in
normal OS
JRVE
I/O time in
JRVE
• Avoid transition cost from user mode to kernel mode
sabato 5 marzo 2011
32. Security
• Very few entry points
– Normal OS installations end up with a lot of services enabled
– JRVE does not implement more than is absolutely needed
– Extremely small configuration
• Less entry points – less threats
sabato 5 marzo 2011
33. Manage: WebLogic Server with JRockit Virtual Edition
(Approximate WebLogic with
Linux JeOS
Numbers) JRockit VE
Config. Files 1000 200 1
Commands 3000 500 10
Command Params. 50,000 10,000 100
Admin Tools 500 200 1
Boot Time (s) 50 30 1
Size (MB) 1000 200 2
Reduction Ratio
from Linux 1 ~2 ~300
sabato 5 marzo 2011
34. Performance: WebLogic Server with JRockit Virtual
Edition
Performance Issue Standard WebLogic with
JVM / OS JRockit Virtual
Edition
Java Aware Scheduling? No Yes
Kernel Mode Transitions? Many Very few
Shorter Switching Times? No Yes
Optimize size of Heap No Yes
Shorter I/O Path? No Yes
sabato 5 marzo 2011
35. Off-line Appliance Management
Full stack externalized configuration.
Can be managed off-line!
WLS
Configuration is not externalized. Java Application
Cannot be managed off-line!
JRockit JVM
JRockitVE
OS
Virtual Server
Virtual Server
In a virtual environment most servers are off-line.
Traditional OS’s have their configuration deeply embedded and can therefore
not be managed off-line.
Have full stack externalized configuration, and it can be fully managed off-line.
*manage = reconfigure, patch, modify
sabato 5 marzo 2011