1 / 49

External guide– Internal guide- Mr. Kedar Sovani Prof Mukta Takalikar

HUGEPAGE SUPPORT IN LINUX BASED VIRTUALIZATION. External guide– Internal guide- Mr. Kedar Sovani Prof Mukta Takalikar DREAMZ Group. PICT,Pune . Group members – Aditya Gadre B3054204 Keshav Darak B3054243 Kaustubh Kabra B3054279 Ashwin Vasani B3054365.

marcus
Download Presentation

External guide– Internal guide- Mr. Kedar Sovani Prof Mukta Takalikar

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HUGEPAGE SUPPORT IN LINUX BASED VIRTUALIZATION • External guide–Internal guide- Mr. KedarSovani Prof MuktaTakalikar DREAMZ Group. PICT,Pune. • Group members– • AdityaGadre B3054204 • KeshavDarak B3054243 • KaustubhKabra B3054279 • AshwinVasani B3054365

  2. PROBLEM DEFINITION To design a memory management unit (MMU) based paging mechanism in Xen hypervisor which will add support for huge pages (2MB) such that 4 KB pages and huge pages will now co-exist for a paravirtualized domain kernel to improve performance.

  3. BUSINESS VALUE ARCHITECTURE REVIEW APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  4. HUGE PAGE Huge page translation reduces the normal page walk by 1 level. The Huge page TLB cache improves the performance by increasing the speed by15% to 20%.

  5. Virtual address 3 Only 2 memory access additional to reach to a byte 4 KB page Singleton Physical address 1 2 PS 2 MB page Huge Page 3 memory acccess additional to reach to a byte Physical address Virtual address

  6. HUGE PAGE Huge page translation reduces the normal page walk by 1 level. The Huge page TLB cache improves the performance by increasing the speed by15% to 20%.

  7. TLB Scenario RAM TLB Cache VA PA 1 entry 512 entries 2 MB

  8. Bare Metal VS XEN Hardware Hardware

  9. XEN ??

  10. BUSINESS VALUE ARCHITECTURE REVIEW APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  11. BUSINESS VALUE ARCHITECTURE REVIEW APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  12. Requesting 2MB Requesting 4KB DOMU (1) DOM U (2) Memory Request denied Hypervisor RAM

  13. PROBLEM DEFINITION To design a memory management unit (MMU) based paging mechanism in Xen hypervisor which will add support for huge pages (2MB) such that 4 KB pages and huge pages will now co-exist for a paravirtualized domain kernel to improve performance.

  14. BUSINESS VALUE ARCHITECTURE REVIEW • APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  15. CONCEPTS Kernel Domain Kernel Domain Kernel VA VA_to_PFN VA_to_PFN PFN RAM Hypervisor P2M MFN • VA : Virtual Address in Kernel • PFN : Physical Frame Number • MFN : Machine Frame Number • P2M Mapping: Physical to Machine Mapping

  16. IMPLEMENTATION OVERVIEW Requesting 2MB Requesting 4KB DOMU (1) Hypervisor Boot time reservation of memory RAM

  17. Implementation steps : 1. Domain creation 2. Domain booting 3. Demand supply

  18. Implementation steps : 1. Domain creation 2. Domain booting 3. Demand supply

  19. Domain creation Domain’s Config memory=900 ---------------------- ---------------------- ---------------------- struct domain{ hugepage_num; hugepage_list; }; hugepage_num=50 50 Domain Create MFNs Xen’s Allocator RAM Xen MFNs

  20. Implementation steps : 1. Domain creation 2. Domain booting 3. Demand supply

  21. Domain booting xen_extra_mem_start Kernel 900M 800M Kernel Booting Hypercall to Get hugepage count Xen Hypervisor struct domain{ hugepage_num; hugepage_list; }; PFNs 50

  22. Implementation steps : 1. Domain creation 2. Domain booting 3. Demand supply

  23. Demand xen_extra_mem_start Kernel 900M 800M Hugepage Request Kernel PFN Hypercall to Allocate hugepage P2M MFN Xen Hypervisor RAM MFN Xen PFNs MFNs struct domain{ hugepage_num; hugepage_list; };

  24. FINAL VISION(Transparent Huge Pages) Requesting 4KB Requesting 2MB DOMU (1) DOM U (2) Hypervisor RAM

  25. BUSINESS VALUE ARCHITECTURE REVIEW • APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO- AMAZON DEMO CHALLENGES IMPLEMENTATION PERFORMANCE

  26. PERFORMANCE GRAPHS Threads =4 Threads =6 Threads =8 Threads =10 X axis: Memory read and wrote (in MBs) Y axis: Time required (in seconds)

  27. BUSINESS VALUE ARCHITECTURE REVIEW • APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  28. Challenge 1 : Paging DOCUMENTATION

  29. Challenge 2 : Handling read-only ptes in guest domains Read-Only Access to Guest Page Tables Read-Only Access to Guest Page Tables Xen Hypervisor

  30. Challenge 3 (1/2): Aligned PFNs and unaligned MFNs Domain Kernel 512 aligned pfns for Huge Pages PFN 2MB Boundary Xen Hypervisor Unaligned non- contiguous 512MFNs MFN

  31. Challenge 3 (1/2): Aligned PFNs and unaligned MFNs Domain Kernel Unaligned un-contiguous PFN PFN Xen Hypervisor Aligned (512 )MFN MFN 2MB Boundary

  32. Our solution: Aligned PFNs and Aligned MFNs Domain Kernel 512 aligned pfns for Huge Pages PFN 2MB Boundary Hypervisor can complete request successfully Aligned (512 )MFN MFN 2MB Boundary

  33. BUSINESS VALUE ARCHITECTURE REVIEW • APPLICATIONS & FUTURE ENHANCEMENTS X-XEN CURRENT SCENARIO CHALLENGES IMPLEMENTATION PERFORMANCE

  34. APPLICATIONS

  35. FUTURE ENHANCEMENTS • Existing Live Migration implementations need to be compatible with this implementation. • Support for 1GB huge pages.

  36. REFERENCES • http://linuxgazette.net/155/krishnakumar.html : HugeTLB - Large Page Support in the Linux Kernel • “Memory Management in Linux”by AbhishekNayani, Mel Gorman & Rodrigo • “XEN Memory Management (Intel IA-32)” by Andr´esKrapf. • “Memory Overcommit without the commitment” by Dan Magenheimer, Oracle Corp. Xen Summit, June 2008 • “Xen and art of virtualization”By P. Barham, B.Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, R. Neugebauer, I. Pratt, and A. Warfield. In Proc. SOSP, 2003

  37. CONTRIBUTION • Patch submitted for review to Jeremy Fitizhardinge, Keir Fraser and Xen-Devel community • http://tinyurl.com/HugePagea2k2Patch1 • www.github.com/a2k2/ • Kernel-PV-hugepages • Xen-hugepages • XEN memory: Enlightening memory management in XEN - Team a2k2 • www.ashwinvasani.wordpress.com • Summarized documentation of the project • www.xxen-docs.co.cc

  38. AWARDS 1 CONCEPTS-2011 • 1st in Systems • 2nd in Open Software • PLUG trophy PROJECT @ INTECHXICATION ,MIT PAPER PRESENTED @ OTTAWA LINUX SYMPOSIUM PROJECT @ BHARTEEYAM ,BVP PROJECT @ TESLA ,MITCOE PROJECT @ ZION ,DY PATIL PAPER @ EXCELSIOR ,Sinhagad PAPER @ TESLA ,MITCOE POSTER @ TESLA ,MITCOE 2 POSTER @ ZION ,DY PATIL 3 PAPER @ BHARTEEYAM ,BVP PROJECT @ IMPETUS ,PICT PAPER @ TECHKRITI , IIT-Kanpur

  39. ENLIGHTENERS • KedarSovani (Marvell & Former Maintainer of Fedora- ARM) • Prof. MuktaTakalikar (PICT) • Jeremy Fitizhardinge (PV-Kernel maintainer) • Keir Fraser (Xen maintainer) • Dan Magenheimer (Tmem maintainer) • Tim Deegan (Citrix)

  40. THANK YOU. ?

More Related