Fast and Correct Performance Recovery of Operating Systems Using a Virtual Machine Monitor Kenichi Kourai Kyushu Institute of Technology, Japan.

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Difference Engine: Harnessing Memory Redundancy in Virtual Machines by Diwaker Gupta et al. presented by Jonathan Berkhahn.
G Robert Grimm New York University Virtual Memory.
Cache Definition Cache is pronounced cash. It is a temporary memory to store duplicate data that is originally stored elsewhere. Cache is used when the.
Fast and Safe Performance Recovery on OS Reboot Kenichi Kourai Kyushu Institute of Technology.
A Fast Rejuvenation Technique for Server Consolidation with Virtual Machines Kenichi Kourai Shigeru Chiba Tokyo Institute of Technology.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
Kenichi Kourai (Kyushu Institute of Technology) Takeshi Azumi (Tokyo Institute of Technology) Shigeru Chiba (Tokyo University) A Self-protection Mechanism.
Efficient VM Introspection in KVM and Performance Comparison with Xen
Chapter 11: File System Implementation
File System Implementation
Computer ArchitectureFall 2008 © November 10, 2007 Nael Abu-Ghazaleh Lecture 23 Virtual.
Computer ArchitectureFall 2007 © November 21, 2007 Karem A. Sakallah Lecture 23 Virtual Memory (2) CS : Computer Architecture.
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
CacheMind: Fast Performance Recovery Using a Virtual Machine Monitor Kenichi Kourai Kyushu Institute of Technology, Japan.
HyperSpector: Virtual Distributed Monitoring Environments for Secure Intrusion Detection Kenichi Kourai Shigeru Chiba Tokyo Institute of Technology.
Kenichi Kourai (Kyushu Institute of Technology) Takuya Nagata (Kyushu Institute of Technology) A Secure Framework for Monitoring Operating Systems Using.
Some VM Complications Extra memory accesses Page tables are huge
Distributed File Systems
CS 153 Design of Operating Systems Spring 2015 Lecture 17: Paging.
1 Geiger: Monitoring the Buffer Cache in a Virtual Machine Environment Stephen T. Jones Andrea C. Arpaci-Dusseau Remzi H. Arpaci-Dusseau Department of.
Lecture 19: Virtual Memory
Zero-copy Migration for Lightweight Software Rejuvenation of Virtualized Systems Kenichi Kourai Hiroki Ooba Kyushu Institute of Technology.
The Memory Hierarchy 21/05/2009Lecture 32_CA&O_Engr Umbreen Sabir.
Joonwon Lee Recovery. Lightweight Recoverable Virtual Memory Rio Vista.
A Measurement Based Memory Performance Evaluation of High Throughput Servers Garba Isa Yau Department of Computer Engineering King Fahd University of Petroleum.
1 File Systems: Consistency Issues. 2 File Systems: Consistency Issues File systems maintains many data structures  Free list/bit vector  Directories.
Dynamic and Secure Application Consolidation with Nested Virtualization and Library OS in Cloud Kouta Sannomiya and Kenichi Kourai (Kyushu Institute of.
Free Space Management.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
File System Implementation
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
1 A Secure Access Control Mechanism against Internet Crackers Kenichi Kourai* Shigeru Chiba** *University of Tokyo **University of Tsukuba.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
CS333 Intro to Operating Systems Jonathan Walpole.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Processes and Virtual Memory
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 12: File System Implementation File System Structure File System Implementation.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Secure Offloading of Legacy IDSes Using Remote VM Introspection in Semi-trusted IaaS Clouds Kenichi Kourai Kazuki Juda Kyushu Institute of Technology.
Split Migration of Large Memory Virtual Machines
Translation Lookaside Buffer
Free Transactions with Rio Vista
Jonathan Walpole Computer Science Portland State University
Memory COMPUTER ARCHITECTURE
Kenichi Kourai Hiroki Ooba Kyushu Institute of Technology, Japan
Morgan Kaufmann Publishers
CSE 153 Design of Operating Systems Winter 2018
Sho Kawahara and Kenichi Kourai Kyushu Institute of Technology, Japan
I'm Kenichi Kourai from Kyushu Institute of Technology.
Lecture 29: Virtual Memory-Address Translation
Preventing Performance Degradation on Operating System Reboots
Free Transactions with Rio Vista
Translation Lookaside Buffer
Overview: File system implementation (cont)
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
CSE 153 Design of Operating Systems Winter 2019
Page Cache and Page Writeback
4.3 Virtual Memory.
Kenichi Kourai Kyushu Institute of Technology
Low-cost and Fast Failure Recovery Using In-VM Containers in Clouds
Virtual Memory 1 1.
Efficient Migration of Large-memory VMs Using Private Virtual Memory
Presentation transcript:

Fast and Correct Performance Recovery of Operating Systems Using a Virtual Machine Monitor Kenichi Kourai Kyushu Institute of Technology, Japan

Recovery by OS Reboot  OS reboot is a final but powerful recovery technique  For recovery from OS crashes  Against Mandelbugs  A rebooted OS rarely crashes again  For software rejuvenation  Against aging-related bugs  A rebooted OS restores its normal state reboot recovered OS crash memory leak

Performance Degradation  OS reboot degrades the performance of file accesses  Disk access increases due to frequent cache misses  The page cache on memory is lost  It takes a long time to fill the page cache  Disk access also degrades the performance of the other virtual machines (VMs) page cache reboot slow disk VM

Performance Recovery Required  OS recovery does not complete until the performance is also recovered  Traditional OS reboot restores only the functionalities  Fast reboot techniques have been proposed...

Warm-cache Reboot  A new OS recovery mechanism with fast performance recovery  It preserves the page cache during OS reboot  An OS can reuse it after the reboot  It guarantees the consistency of the page cache  Using the virtual machine monitor (VMM) CacheMind VMM VM page cache reboot page cache discard corrupted cache

Reusing the Page Cache  Collaboration between an OS and the VMM  cmLinux registers cache information to the VMM  On reboot, the VMM re-allocates the same memory  cmLinux reserves the memory for the old page cache  cmLinux searches the old page cache before disk reads CacheMind VMM register page cache cmLinux reboot re-allocate old page cache meta data

Cache Consistency  Only consistent cache pages are reused  Our definition: consistent if the contents of a cache page are the same as those in a disk  Consistent when a file block is read from a disk  Inconsistent when the cache page is modified  Consistent when it is written back to a disk disk cmLinux page cache read write back modify

Reusability Management (Read)  The VMM makes a cache page reusable after it reads data from a disk  It protects the page before the read  To detect page corruption during the read  The VMM can write data to the page VMM read request read request disk possible corruption reusable protect read protect read cmLinux

Reusability Management (Write)  The VMM makes a cache page non-reusable when an OS modifies its contents  It unprotects the page at the same time  To enable the OS to modify the page  It makes the page reusable again after it writes back the contents VMM modify request unprotect write back VMM write request disk protect

More Checks for Cache Reuse  Isn’t the cache page mapped elsewhere in a writable manner?  The VMM counts writable mapping  Hasn’t the cache page been mapped in a writable manner since protected?  The VMM maintains a canary bit as a history VMM read/write request protect read/write corruption map unmap

Reusability Management (Mmap)  cmLinux uses unprotect-on-write to exactly detect writes to memory-mapped files  It maps a cache page with protection on a read  It unprotects the page on a fault by the first write  It protects the page again after msync RW read write msync VMM reuse RO RW no reuse RO

Optimization: Double Caching  cmLinux writes data to a new cache page if the original page is protected  This can delay unprotecting the original page until writeback  The improvement depends on written bytes VMM page cache originalnew more than 1.5KB cmLinux

Experiments  We have developed CacheMind using Xen  We conducted several experiments to show  Fast performance recovery  Overheads  Reusing only consistent cache pages CPU: 2 dual-core Opteron Memory: 12 GB Disk: Ultra 320 SCSI NIC: Gigabit Ethernet VMM: Xen OS: Linux domain 0domain U VMM disk cache-mapping table blkback blkfron t reuse bitmap page cache

Throughput of File Read  We measured the read throughput of a 1GB file  We rebooted the OS after the 3rd access  Just after the reboot  4KB buffer size  8.7x higher throughput  Only 16% degradation  Recovery time is 1s

Throughput of File Write  We measured the write throughput  Just after the reboot  4KB buffer size  Not improved  Due to no read  2KB buffer size  8x higher throughput  33% degradation

Throughput of Mmap Read/write  We measured the throughput of read/write of a memory-mapped file  Just after the reboot  Read  6x higher throughput  15% degradation  Write  5x higher throughput  9% degradation 4KB buffer size

Overheads  We measured the overheads for enabling the warm-cache reboot  IOzone  0-13% for files  3-9% for mmap  Writeback  0.4% for fsync  1.6% for msync 2KB buffer size

Worst-case Overheads  We measured the overheads in extreme cases  Partial writes to cache pages  Cost for double caching or unprotecting  33% for 1 byte/page  Unprotect-on-write for memory-mapped files  Cost for extra page faults on write after read  25% for read & write

Throughput of a Web Server  We measured the changes of the throughput during OS reboot 40% degradation for 90 seconds 5% degradation for 60 seconds

Fault Injection (1/2)  We examined the reuses of inconsistent cache  We injected various faults into the OS kernel  First, we disabled the consistency mechanism Cache pages were often corrupted

Fault Injection (2/2)  Next, we enabled the consistency mechanism  Reused cache pages were inconsistent only for DST  Ext3 failed to write back  Faults were injected into ext3  Cache pages were not corrupted  Reusing them is correct

Related Work  Rio File Cache [Chen+ ASPLOS’96]  Reusing dirty file cache after OS crash  Relying on an OS  OtherWorld [Depoutovitch+ EuroSys’10]  Recovering application state after OS crash  Relying on low probability of cache corruption  Geiger [Jones+ ASPLOS’06]  Inferring the page cache in the VMM  Difficult to recognize cache eviction

Conclusion  We proposed the warm-cache reboot  It achieves fast performance recovery by reusing the page cache  8.7x faster recovery at maximum  The VMM maintains the consistency of the page cache  Consistent, or not corrupted at least  Future work  Reducing modification to an OS