eecs 750 advanced operating systems
play

EECS 750: Advanced Operating Systems 01/31 /2014 Heechul Yun - PowerPoint PPT Presentation

EECS 750: Advanced Operating Systems 01/31 /2014 Heechul Yun Administrative Next summary assignment due by 11:59 p.m., Sunday Improving Performance Isolation on Chip Multiprocessors via an Operating System Scheduler, PACT07


  1. EECS 750: Advanced Operating Systems 01/31 /2014 Heechul Yun

  2. Administrative • Next summary assignment due – by 11:59 p.m., Sunday – Improving Performance Isolation on Chip Multiprocessors via an Operating System Scheduler, PACT’07 • Sign up for presentations – First student presentation starts on Feb 3. (Monday) • Project group – Due on Feb 3. (Monday)

  3. Recap: CPU Scheduling • Unicore scheduling – Fairness and responsiveness – Completely Fair Scheduler – BVT • Multicore scheduling – Partitioned scheduling – Load balancing – DWRR and global fairness

  4. Today • Topic: Group scheduling and resource management • Linux’s CGROUP mechanism • Resource Containers: A New Facility for Resource Management in Server Systems, OSDI’99

  5. Process Abstraction • Basic unit for resource accounting – E.g., cpu time spent, memory size, … • Basic unit for scheduling • But …

  6. A Scenario • Background tasks in your desktop – E.g., BitTorrent, AntiVirus scan, create search indexes for local files, … • Control all background tasks to consume – Less than 10% of CPU time – Less than 20% of total memory – Less than 50% of network bandwidth – …

  7. Another Scenario • Tasks in a server node – Map/reduce processes – Web server processes Threads/server at Google(*) – Search query processing processes – … • You want to – Control all map/reduce processes’ resources – Control all web server processes’ resources – … • How? (*) Figure source: Zheng et al, “CPI2: CPU performance isolation for shared compute clusters”, EuroSys’13

  8. CGROUP in Linux • Control Group – Started by engineers at Google in 2006 • Group multiple processes – E.g., EECS750 (15 processes), EECS678 (30 processes) groups • Control resource usage on a per-group basis – E.g., 70% CPU to EECS750, 30% CPU to EECS678

  9. Group Hierarchy Root Group Undergraduate Graduate Group Group PhD Master Group Group • Represents a tree structured relationship among groups

  10. Resource Management 100% CPU 100% MEM Root Group 30% CPU 70% CPU 50% MEM 50% MEM Undergraduate Graduate Group Group PhD Master Group Group 30% CPU 40% CPU 30% MEM 20% MEM • Control resource allocation on a per-group basis

  11. CGROUP Subsystems • Control resources of a CGROUP • Available subsystems CPU b/w limit, weight (share), … – cpu memory size limit, … – memory cores, memory controllers, … – cpuset – …

  12. Example # mount -t cgroup none /sys/fs/cgroup; # cd /sys/fs/cgroup # mkdir grad; mkdir grad/phd; mkdir /grad/master → create ‘grad’, ‘phd’, ‘master’ CGROUPs # # echo 100 101 > grad/phd/tasks → assign PID 100, 101 to the ‘phd’ group # echo 200 201 202> grad/master/tasks → assign PID 200, 201,202 to the ‘master’ group # echo 3072 > grad/phd/cpu.shares # echo 4096 > grad/master/cpu.shares → assign 3:4 CPU weights to ‘phd’ and ‘master’ groups See https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt

  13. Today’s Paper • Resource Containers: A New Facility for Resource Management in Server Systems, OSDI’99

  14. Some Background • Dot-com bubble (1997-2000) – Many internet companies were founded • Google: 1998, Netflix: 1997 – Every company wanted to create its website • Web server research – First version of Apache webserver in 1995 – High performance web server was a hot topic • Client computing → Server computing

  15. Classical Application • An application = A process = A resource principal (CPU time, memory)

  16. Kernel Intensive Application • Scenario: interrupt handling to receive packets for process A occurred while executing process B – Time spent on ISR will be charged to process B’s system time. – Packet buffer memory is not charged to any process • Resources spent on kernel are not controlled

  17. Application with Multiple Processes • How to account and manage resources for a group of processes?

  18. Resource Container • A logical abstraction to manage resources – Resources: CPU time, memory, … • A resource container can be associated with multiple processes (threads) • Can construct a hierarchy

  19. Example Container 1 Container 2 CGI Process #1 Web Clients Web Dynamic document Server CGI Process #N Static documents

  20. Web Server Throughput

  21. Summary • Group resource management – Generic abstraction to account and control resources • CGROUP in Linux – Powerful tools which are heavily used by google cloud, android, and many Linux distros

  22. Discussion • What resources are important? • What resources are controllable by the OS? • What resources are not controllable by the OS?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend