Virtualizing a Virtual Machine

800 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
800
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
38
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Virtualizing a Virtual Machine

  1. 1. Virtualizing a Virtual Machine Azeem Jiva Shrinivas Joshi AMD Java Labs TS-5227
  2. 2. Learn best practices for deploying Java EE applications in virtualized environment 2008 JavaOneSM Conference | java.com.sun/javaone | 2
  3. 3. Agenda What is Virtualization? Types of Virtualization Why Virtualize? Accelerating Virtualization Java EE Summary Q&A 2008 JavaOneSM Conference | java.com.sun/javaone | 3
  4. 4. What is Virtualization? Platform Virtualization • Abstraction of a computer Resource Virtualization • Abstraction or simplification of a resource • Hide physical characteristics of computing resource Provides consistent interface, regardless of resource location 2008 JavaOneSM Conference | java.com.sun/javaone | 4
  5. 5. Agenda What is Virtualization? Types of Virtualization Why Virtualize? Accelerating Virtualization Java EE Summary Q&A 2008 JavaOneSM Conference | java.com.sun/javaone | 5
  6. 6. Types of Virtualization Overview Native • VMWare Workstation • Microsoft® Virtual PC • QEMU • Virtual Box • KVM Hypervisor • VMWare ESX Server • XEN 2008 JavaOneSM Conference | java.com.sun/javaone | 6
  7. 7. Types of Virtualization Native 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 Guest OS Guest OS Guest OS Virtualization Software Host Operating System Hardware 2008 JavaOneSM Conference | java.com.sun/javaone | 7
  8. 8. Types of Virtualization Hypervisor 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 tested Guest OS Guest OS Guest OS Hypervisor Hardware 2008 JavaOneSM Conference | java.com.sun/javaone | 8
  9. 9. Agenda What is Virtualization? Types of Virtualization Why Virtualize? Accelerating Virtualization Java EE Summary Q&A 2008 JavaOneSM Conference | java.com.sun/javaone | 9
  10. 10. 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 Maintain legacy OSs and applications 2008 JavaOneSM Conference | java.com.sun/javaone | 10
  11. 11. 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 • Limit the number of I/O-bound applications • Disk is the worst offender Immature tools Specialized skill set required 2008 JavaOneSM Conference | java.com.sun/javaone | 11
  12. 12. Agenda What is Virtualization? Types of Virtualization Why Virtualize? Accelerating Virtualization Java EE Summary Q&A 2008 JavaOneSM Conference | java.com.sun/javaone | 12
  13. 13. Accelerating Virtualization AMD-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 Device Exclusion Vector (DEV) • Excludes devices from accessing memory • Bit to include/exclude devices from accessing a page 2008 JavaOneSM Conference | java.com.sun/javaone | 13
  14. 14. Agenda What is Virtualization? Types of Virtualization Why Virtualize? Accelerating Virtualization Java EE Summary Q&A 2008 JavaOneSM Conference | java.com.sun/javaone | 14
  15. 15. Java EE Virtualizing 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 • Performance • Resource allocation • Bottlenecks • Consolidation 2008 JavaOneSM Conference | java.com.sun/javaone | 15
  16. 16. Java EE Performance 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 Linux® Guest OS • Different mapping techniques are used over 896 MB Be prepared for decrease in performance 2008 JavaOneSM Conference | java.com.sun/javaone | 16
  17. 17. Java EE Resource Allocation Three-tier testing on single system Page sharing • Sharing of guest memory pages • Decreases host memory usage • 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!) 2008 JavaOneSM Conference | java.com.sun/javaone | 17
  18. 18. Java EE Bottlenecks 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
  19. 19. Java EE Bottlenecks 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 • Lots of small packets affect latency • Dedicated NIC 2008 JavaOneSM Conference | java.com.sun/javaone | 19
  20. 20. Java EE Consolidation 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 Run many Guest OSes on a single system • Each application thinks it is on 1-4 processing cores 2008 JavaOneSM Conference | java.com.sun/javaone | 20
  21. 21. 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
  22. 22. For More Information Sites • http://www.amd.com/virtualization • http://developer.amd.com/ 2008 JavaOneSM Conference | java.com.sun/javaone | 22
  23. 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. 2008 JavaOneSM Conference | java.com.sun/javaone | 23
  24. 24. Azeem Jiva Shrinivas Joshi AMD Java Labs TS-5227 2008 JavaOneSM Conference | java.com.sun/javaone | 24

×