HUGEPAGE
This presentation is the property of its rightful owner.
Sponsored Links
1 / 49

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


  • 107 Views
  • Uploaded on
  • Presentation posted in: General

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.

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


External guide internal guide mr kedar sovani prof mukta takalikar

HUGEPAGE SUPPORT IN LINUX BASED VIRTUALIZATION

  • External guide–Internal guide-

    Mr. KedarSovaniProf MuktaTakalikar

    DREAMZ Group.PICT,Pune.

  • Group members–

    • AdityaGadreB3054204

    • KeshavDarakB3054243

    • KaustubhKabraB3054279

    • AshwinVasaniB3054365


Problem definition

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.


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


Huge page

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%.


External guide internal guide mr kedar sovani prof mukta takalikar

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


Huge page1

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%.


Tlb scenario

TLB Scenario

RAM

TLB Cache

VA PA

1

entry

512

entries

2 MB


Bare metal vs xen

Bare Metal VS XEN

Hardware

Hardware


External guide internal guide mr kedar sovani prof mukta takalikar

XEN

??


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


External guide internal guide mr kedar sovani prof mukta takalikar

Requesting 2MB

Requesting 4KB

DOMU

(1)

DOM U

(2)

Memory

Request denied

Hypervisor

RAM


Problem definition1

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.


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

  • APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


External guide internal guide mr kedar sovani prof mukta takalikar

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


External guide internal guide mr kedar sovani prof mukta takalikar

IMPLEMENTATION OVERVIEW

Requesting 2MB

Requesting 4KB

DOMU

(1)

Hypervisor

Boot time reservation of memory

RAM


External guide internal guide mr kedar sovani prof mukta takalikar

Implementation steps :

1. Domain creation

2. Domain booting

3. Demand supply


External guide internal guide mr kedar sovani prof mukta takalikar

Implementation steps :

1. Domain creation

2. Domain booting

3. Demand supply


Domain creation

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


External guide internal guide mr kedar sovani prof mukta takalikar

Implementation steps :

1. Domain creation

2. Domain booting

3. Demand supply


Domain booting

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


External guide internal guide mr kedar sovani prof mukta takalikar

Implementation steps :

1. Domain creation

2. Domain booting

3. Demand supply


Demand

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;

};


External guide internal guide mr kedar sovani prof mukta takalikar

FINAL VISION(Transparent Huge Pages)

Requesting 4KB

Requesting 2MB

DOMU

(1)

DOM U

(2)

Hypervisor

RAM


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

  • APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO-

AMAZON DEMO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


Performance graphs

PERFORMANCE GRAPHS

Threads =4

Threads =6

Threads =8

Threads =10

X axis: Memory read and wrote (in MBs)

Y axis: Time required (in seconds)


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

  • APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


External guide internal guide mr kedar sovani prof mukta takalikar

Challenge 1 :

Paging

DOCUMENTATION


External guide internal guide mr kedar sovani prof mukta takalikar

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


External guide internal guide mr kedar sovani prof mukta takalikar

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


External guide internal guide mr kedar sovani prof mukta takalikar

Challenge 3 (1/2): Aligned PFNs and unaligned MFNs

Domain Kernel

Unaligned un-contiguous PFN

PFN

Xen Hypervisor

Aligned (512 )MFN

MFN

2MB Boundary


External guide internal guide mr kedar sovani prof mukta takalikar

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


External guide internal guide mr kedar sovani prof mukta takalikar

BUSINESS VALUE

ARCHITECTURE

REVIEW

  • APPLICATIONS & FUTURE ENHANCEMENTS

X-XEN

CURRENT SCENARIO

CHALLENGES

IMPLEMENTATION

PERFORMANCE


Applications

APPLICATIONS


Future enhancements

FUTURE ENHANCEMENTS

  • Existing Live Migration implementations need to be compatible with this implementation.

  • Support for 1GB huge pages.


References

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


Contribution

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


Awards

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


Enlighteners

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)


Thank you

THANK YOU.

?


  • Login