1 / 24

Dynamic Virtual Machine Scheduling in Clouds for Architectural Shared Resources

Dynamic Virtual Machine Scheduling in Clouds for Architectural Shared Resources. Jeongseob Ahn , Changdae Kim, Jaeung Han , Young- ri Choi † , and Jaehyuk Huh KAIST and † UNIST. Challenges for Cloud Computing. Virtual machines (VM) share physical resources

carnig
Download Presentation

Dynamic Virtual Machine Scheduling in Clouds for Architectural Shared Resources

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. Dynamic Virtual Machine Scheduling in Clouds for Architectural Shared Resources JeongseobAhn, Changdae Kim, Jaeung Han, Young-riChoi†, and Jaehyuk Huh KAIST and †UNIST

  2. Challenges for Cloud Computing • Virtual machines (VM) share physical resources • Improve overall utilization of limited resources • Resource contention: potential performance degradation • Multi-cores has enabled the sharing of architectural resources • Shared last level caches (LLCs) and memory controllers • Contention on such architectural resources • Major reason for performance variance • VM performance affected by co-runners

  3. Shared Cache Contention • Shared cache contention • When a core generates excessive cache misses and evicts the cached data from the other cores, contention occurs • Way to solve cache contention problem • Partitioning caches • Qureshi et al. [MICRO’06] • Suh et al. [HPCA’02] • Scheduling threads carefully in multiple LLC environment • Merkel et al. [EuroSys’10] • Zhuravlev et al [ASPLOS’10]

  4. Shared Cache Scheduling Opportunities • Scheduling threads to mitigate interferences in shared caches • Zhuravlev et al. [ASPLOS’10] • Evenly distribute threads according to LLC miss rate Single Thread High LLC missrate Shared LLC Shared LLC 1.Threads having most LLC miss rate are assigned to each core 2.Threads having least LLC miss rate are assigned to each core 3.Threads having secondly most LLC miss rate are assigned to each core Threads are sorted with LLC missrate 4.Threads having secondly least LLC miss rate are assigned to each core Threads are grouped to mitigate the interferences for shared cache Memory Controller Network Router Memory Controller Network Router Low LLC missrate DRAM MODULE

  5. Cache Contention + NUMA Affinity • NUMA affinity complicates such cache aware scheduling • Blagodurov et al. [USENIX ATC’11] • Investigated the impact of NUMA on cache-aware scheduling to reduce negative interferences among threads High LLC missrate Shared LLC Shared LLC Remote access occurs !! Local access occurs !! Memory Controller Network Router Memory Controller Network Router Low LLC missrate M M D D I I M M D D I M M M M I DRAM MODULE

  6. Cache Contention + NUMA Affinity • NUMA affinity complicates such cache aware partitioning • Blagodurov et al. [USENIX ATC’10] • Investigated the impact of NUMA on cache-aware scheduling to reduce negative interferences among threads However, cloud systems with virtualization open a new opportunity to widen the scope of contention-aware scheduling High load Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router Low load I M M M M D I M M D I D I M M D

  7. Scheduling Opportunities in Clouds • Intra-system scheduling limits the opportunity to search the best groups of threads • Each machines are scheduled efficiently, but it is inefficient in global view Shared LLC Shared LLC Shared LLC Shared LLC Memory Controller Memory Controller Network Router Network Router Memory Controller Memory Controller Network Router Network Router M M M M I I M M D D M M I I D D Contention occured Contention not occured Node A Node B High LLC missrate Low LLC missrate

  8. Scheduling Opportunities in Clouds • In virtualized cloud system, we have an increased chance to find a better grouping of VMs Shared LLC Shared LLC Shared LLC Shared LLC Shared LLC Shared LLC Shared LLC Shared LLC Thread  Virtual Machine Memory Controller Memory Controller Memory Controller Memory Controller Network Router Network Router Network Router Network Router Memory Controller Memory Controller Memory Controller Memory Controller Network Router Network Router Network Router Network Router M M M M M M M M I I I I M M M M D D D D M M M M I I I I D D D D fUse live migration !! Node D Node C Node A Node B

  9. Performance Implication in Clouds • Compare six different VM mapping policies for cache & memory • 2 version of cache sharing aspect • Best case (B) : map VMs to cores to minimize the sum of LLC misses from all the sockets in the clouds system • Worst case (W) : map VM with highest difference between the largest and smallest per-socket LLC misses in the clouds system • 3 version of NUMA affinity • Best allocation (B) : all VM memory pages are allocated in their local sockets • Worst allocation (W) : memory pages of all VMs are allocated in their remote sockets • Interleaved allocation (I) : assigns the memory pages of a VM to be always in both sockets in an interleaved way

  10. Interleaved memory allocation • Interleaved memory allocation • Remove NUMA affinity • Constant memory access latency regardless of the location of VM Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router M D I M M D M I f Access latency : NUMA best < NUMA interleaving < NUMA worst

  11. Performance Implication in Clouds • Normalized with cache worst & NUMA worst case • W-I : Cache worst & NUMA interleaved • W-B : Cache worst & NUMA best • B-W : Cache best & NUMA worst • B-I : Cache best & NUMA interleaved • B-B : Cache best & NUMA best f There is significant potential for performance improvements by placing VMs considering architectural shared resources

  12. Is Static Placement Possible? • Maybe possible in single system • Execute same application mostly • Impossible in clouds environment • VM behaviors cannot be predicted • Dynamic scheduling & placement is needed

  13. Memory-Aware Cloud Scheduling • Computing node • Check LLC misses with PMC, and send LLC miss and NUMA affinity information to front-end node • Front-end node • Based on VM status information from all computing nodes, it makes global scheduling decisions

  14. Two Scheduling policies • Cache-aware scheduler • Only considers the contentions on shared caches • Composed of two phases • Local phase : VMs are rescheduled on intra-core • Global phase : VMs are migrated between inter-cores • NUMA-aware scheduler • Extends the cache aware scheduler for NUMA affinity of VMs • Only exists global phase • To keep NUMA affinity

  15. Cache-Aware Scheduler • Local phase • Unit of scheduling is VM, not thread VMs in each nodes are grouped to mitigate the interferences for shared resources 5.VMs having secondly least LLC miss rate are assigned to each core 1.VMs are sorted with LLC missrate in each system 4.VMs having secondly most LLC miss rate are assigned to each core 3.VMs having least LLC miss rate are assigned to each core 2.VMs having most LLC miss rate are assigned to each core Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router D I M M D I M M Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router D I M M D I M M Node A Node B

  16. Cache-Aware Scheduler • Global Phase • Do not aware NUMA affinity 1. Find hosts with largest and smallest number of LLC misses 2. Find VMs with the largest and smallest numbers of LLC 3. If LLC difference is larger than threshold, swap them Largest number of LLC miss host! Smallest number of LLC miss host! Shared LLC Shared LLC Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router D I M M D I M M D I M M D I M M Node A Node B

  17. NUMA-Aware Scheduler • Similar with global phase of cache-aware scheduler, but unit of migration is socket, not host. 1. Find sockets with largest and smallest number of LLC misses 2. Find VMs with the largest and smallest numbers of LLC 3. If LLC difference is larger than threshold, swap them Largest number of LLC miss socket! Smallest number of LLC miss socket! Shared LLC Shared LLC Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router M M I M M D D I M M M M I I D D Node A Node B

  18. NUMA-Aware Scheduler • Intra-host migration is also available. 1. Find sockets with largest and smallest number of LLC misses 2. Find VMs with the largest and smallest numbers of LLC 3. If LLC difference is larger than threshold, relocate memory Largest number of LLC miss socket! Smallest number of LLC miss socket! Shared LLC Shared LLC Shared LLC Shared LLC Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router Memory Controller Network Router M M I M M D I M M D M M I I D D Node A Node B

  19. Experimental Methodology • Testbed • Front-end node (1) • Running proposed schedulers • Storage servers for VM images • Computing node (4) • Intel Xeon 8 cores on two chips • Each chip has 12MB LLC shared by 4 cores • Each VM employs a single core and 1GB memory • On top of Xen hypervisor, each node runs 8 guest VMs • VMs use a Ubuntu distribution based on Linux kernel 2.6.18

  20. Experimental Methodology • Benchmark applications • Selected from SPECcpu 2006 • Each workload has 4 different applications • 8 instances of each application run on the 32VMs in our testbed

  21. Performance Improvements • WL1: 2 Memory bound + 2 CPU bound • WL3: 3 Memory bound + 1 CPU bound

  22. Performance Improvements • Show similar trends except for WL6 • WL6 consists of all CPU-bound applications

  23. Conclusions • We proposed memory-aware cloud scheduling • Use live migration • VM live migration can be used to mitigate architectural resource contentions • Cloud-level VM scheduler must consider such hidden contentions • Future work • Extend our preliminary design of NUMA-aware scheduling • Investigate a systematic approach based on a cost-benefit analysis for VM migrations and contention reductions

  24. Thank you !Dynamic Virtual Machine Scheduling in Clouds for Architectural Shared Resources JeongseobAhn, Changdae Kim, Jaeung Han, Young-ri Choi†, and Jaehyuk Huh KAIST and †UNIST

More Related