Date post: | 28-Jan-2015 |
Category: |
Technology |
Upload: | elliando-dias |
View: | 117 times |
Download: | 1 times |
Virtualizing a Virtual Machine
Azeem Jiva
Shrinivas Joshi
AMD Java Labs
TS-5227
Learn best practices for deploying Java EE applications in virtualized environment
2008 JavaOneSM Conference | java.com.sun/javaone | 2
Agenda
What is Virtualization?
Types of Virtualization
Why Virtualize?
Accelerating Virtualization
Java EE
2008 JavaOneSM Conference | java.com.sun/javaone | 3
Java EE
Summary
Q&A
What is Virtualization?
Platform Virtualization• Abstraction of a computer
Resource Virtualization• Abstraction or simplification of a resource
• Hide physical characteristics of computing resource
2008 JavaOneSM Conference | java.com.sun/javaone | 4
• Hide physical characteristics of computing resource
Provides consistent interface, regardless of resource location
Agenda
What is Virtualization?
Types of Virtualization
Why Virtualize?
Accelerating Virtualization
Java EE
2008 JavaOneSM Conference | java.com.sun/javaone | 5
Java EE
Summary
Q&A
Types of VirtualizationOverview
Native• VMWare Workstation
• Microsoft® Virtual PC
• QEMU
• Virtual Box
2008 JavaOneSM Conference | java.com.sun/javaone | 6
• KVM
Hypervisor• VMWare ESX Server
• XEN
Types of VirtualizationNative
Virtualize Guest OS on a Host OS• Linux® running on Windows®
• Windows running on Linux
Host OS not optimized for virtualization (usually)
Advanced virtualization features not available
2008 JavaOneSM Conference | java.com.sun/javaone | 7
Advanced virtualization features not available
Hardware
Host Operating System
Guest OS Guest OS Guest OS
Virtualization Software
Types of VirtualizationHypervisor
Virtualize Guest OS on a thin software layer • Linux® running on ESX Server
• Windows® running on ESX Server
Hypervisor is optimized for virtualization
Advanced virtualization features are available and well
2008 JavaOneSM Conference | java.com.sun/javaone | 8
Advanced virtualization features are available and well tested
Hardware
Hypervisor
Guest OS Guest OS Guest OS
Agenda
What is Virtualization?
Types of Virtualization
Why Virtualize?
Accelerating Virtualization
Java EE
2008 JavaOneSM Conference | java.com.sun/javaone | 9
Java EE
Summary
Q&A
Why Virtualize?Advantages
Not every application needs a full system
Easier to administer• Need to do hardware maintenance?
• Move the virtualized OS disk to another system
Lower datacenter costs
2008 JavaOneSM Conference | java.com.sun/javaone | 10
Lower datacenter costs
Maintain legacy OSs and applications
Why Virtualize?Disadvantages
If Hypervisor crashes, all Guest OSes go with it
Performance• With multiple Guest OSes, performance may suffer
• Usually 10%, can be as high as 20%
I/O-bound applications suffer
2008 JavaOneSM Conference | java.com.sun/javaone | 11
I/O-bound applications suffer• Limit the number of I/O-bound applications
• Disk is the worst offender
Immature tools
Specialized skill set required
Agenda
What is Virtualization?
Types of Virtualization
Why Virtualize?
Accelerating Virtualization
Java EE
2008 JavaOneSM Conference | java.com.sun/javaone | 12
Java EE
Summary
Q&A
Accelerating VirtualizationAMD-V™ Technology
Nested Page Tables• Virtualized CR3 in hardware
Tagged Transition Look-Aside Buffer (TTLB)• Assign ID to TLB entries
• Hardware knows which TLB entry belongs to which Guest OS
2008 JavaOneSM Conference | java.com.sun/javaone | 13
• Hardware knows which TLB entry belongs to which Guest OS
Device Exclusion Vector (DEV)• Excludes devices from accessing memory
• Bit to include/exclude devices from accessing a page
Agenda
What is Virtualization?
Types of Virtualization
Why Virtualize?
Accelerating Virtualization
Java EE
2008 JavaOneSM Conference | java.com.sun/javaone | 14
Java EE
Summary
Q&A
Java EEVirtualizing a complete stack
Application changes not required
Most changes are at Hypervisor level
Java Virtual Machine can be Guest OS• JRockit Liquid
Effects of Virtualization
2008 JavaOneSM Conference | java.com.sun/javaone | 15
Effects of Virtualization• Performance
• Resource allocation
• Bottlenecks
• Consolidation
Java EEPerformance
SPECjbb2005 performance slows down 10%
Use as few virtual CPUs as possible• If application is single-threaded, use a single VCPU
Decrease processor-to-processor communication
If possible use less than 896 MB of physical memory for
2008 JavaOneSM Conference | java.com.sun/javaone | 16
If possible use less than 896 MB of physical memory for Linux® Guest OS• Different mapping techniques are used over 896 MB
Be prepared for decrease in performance
Java EEResource Allocation
Three-tier testing on single system
Page sharing• Sharing of guest memory pages
• Decreases host memory usage
• Decreases I/O bandwidth
2008 JavaOneSM Conference | java.com.sun/javaone | 17
• Decreases I/O bandwidth
Run the same Guest OS for increased page sharing
Move Guest OS from system to system• Running application doesn’t know (or care!)
Java EEBottlenecks
CPU constraints• Guest OS requires all allocated CPUs be available
• Sum of allocated CPUs == physical CPUs
Memory constraints• Sum of allocated memory == physical memory
2008 JavaOneSM Conference | java.com.sun/javaone | 18
• Sum of allocated memory == physical memory
Java EEBottlenecks
Disk I/O constraints• Apps (dB) that have large number of small read/writes severely
affected
• SAN is common, or at least use a separate disk
Network constraints
2008 JavaOneSM Conference | java.com.sun/javaone | 19
• Lots of small packets affect latency
• Dedicated NIC
Java EEConsolidation
Move Guest OS to single system when load is low
Increase CPU core count on the rise• Eight cores common now
• Expect Sixteen cores to be common in two years
Not all applications can take advantage of that many cores
2008 JavaOneSM Conference | java.com.sun/javaone | 20
Not all applications can take advantage of that many cores
Run many Guest OSes on a single system• Each application thinks it is on 1-4 processing cores
Summary
Virtualization helps lower total cost of ownership
Slight performance hit, improved maintainability
Bottlenecks on I/O
Sharing of resources on single Host OS
Consolidate systems
2008 JavaOneSM Conference | java.com.sun/javaone | 21
Consolidate systems
For More Information
Sites• http://www.amd.com/virtualization
• http://developer.amd.com/
2008 JavaOneSM Conference | java.com.sun/javaone | 22
2008 JavaOneSM Conference | java.com.sun/javaone | 23
Trademark Attribution
AMD, the AMD arrow logo and combinations thereof and AMD-V are trademarks of Advanced Micro Devices, Inc. Microsoft and Windows are registered marks of Microsoft Corporation in U.S. and other jurisdictions. Linux is registered trademark of Linus Torvalds.
©2008 Advanced Micro Devices, Inc. All rights reserved.
Azeem Jiva
Shrinivas Joshi
2008 JavaOneSM Conference | java.com.sun/javaone | 24
Shrinivas Joshi
AMD Java Labs
TS-5227