Redline: First Class Support for Interactivity in Commodity Operating Systems

Redline: First Class Support for Interactivity in Commodity Operating Systems

Redline: First Class Support for Interactivity in Commodity Operating Systems Ting Yang Tongping Liu Emery D. Berger Scott F. Kaplan† J. Eliot B. Moss [email protected] [email protected] [email protected] [email protected] [email protected] Dept. of Computer Science †Dept. of Mathematics and Computer Science University of Massachusetts Amherst Amherst College Amherst, MA 01003-9264 Amherst, MA 01002-5000 Abstract Impact of parallel kernel compilation on mplayer 35 Linux CFS While modern workloads are increasingly interactive Redline 30 and resource-intensive (e.g., graphical user interfaces, browsers, and multimedia players), current operating sys- 25 tems have not kept up. These operating systems, which 20 evolved from core designs that date to the 1970s and 1980s, provide good support for batch and command-line applica- 15 tions, but their ad hoc attempts to handle interactive work- 10 loads are poor. Their best-effort, priority-based sched- Frames per Second (fps) 5 ulers provide no bounds on delays, and their resource man- 0 agers (e.g., memory managers and disk I/O schedulers) are 0 200 400 600 800 1000 mostly oblivious to response time requirements. Pressure Elapsed Time (Seconds) on any one of these resources can significantly degrade ap- plication responsiveness. Figure 1: The frame rate of mplayer when performing We present Redline, a system that brings first-class sup- a Linux kernel compiling using make -j32 on a standard port for interactive applications to commodity operating Linux 2.6 kernel and on the Redline kernel. systems. Redline works with unaltered applications and standard APIs. It uses lightweight specifications to or- Unfortunately, existing general-purpose operating sys- chestrate memory and disk I/O management so that they tems do not provide adequate support for these modern serve the needs of interactive applications. Unlike real- applications. Current operating systems like Windows, time systems that treat specifications as strict requirements Linux, and Solaris were designed using standard resource and thus pessimistically limit system utilization, Redline management policies and algorithms, which in turn were dynamically adapts to recent load, maximizing responsive- not developed with interactivity in mind. While their CPU ness and system utilization. We show that Redline deliv- schedulers attempt to enhance interactive behavior, their ers responsiveness to interactive applications even in the memory managers and I/O managers focus on increasing face of extreme workloads including fork bombs, memory system throughput rather than reducing latency. This lack bombs and bursty, large disk I/O requests, reducing appli- of coordination between subsystems, and the fact that they cation pauses by up to two orders of magnitude. can work at cross purposes, means that pressure on any 1 Introduction resource can significantly degrade application responsive- ness. The enormous increases in processing power, memory size, For example, a memory-intensive application can cause storage capacity, and network bandwidth over the past the system to evict pages from the graphical user interface, two decades have led to a dramatic change in the rich- making the system as a whole unresponsive. Similarly, ness of desktop environments. Users routinely run highly- disk-intensive applications can easily saturate I/O band- graphical user interfaces with resource-intensive applica- width, making applications like video players unusable. tions ranging from video players and photo editors to web Furthermore, while best-effort, priority-based schedulers browsers, complete with embedded Javascript and Flash are a good match for batch-style applications, they provide applets. limited support for ensuring responsiveness. Activities that USENIX Association 8th USENIX Symposium on Operating Systems Design and Implementation 73 strain the resources of a system—image or video process- spec related Specification specs ing, working with large data files or file systems, or switch- sys. calls Management ing frequently between a number of active applications— are likely to cause one of the resource managers to under- spec loader allocate resources to some interactive tasks, making those interactive tasks reject tasks respond poorly. Admission Control load As an example, Figure 1 shows the frame rate of best-effort accept info mplayer, a movie player, while a Linux kernel compila- revoke tion, invoked using make -j32, is performed using both a CPU reactivate Load Scheduler Monitor standard Linux 2.6.x kernel and our Redline kernel. For cpu usage the standard kernel, the compilation substantially degrades task memory information the interactivity of the movie player, rendering the video usage unwatchable. Worse, the entire GUI becomes unrespon- I/O Management Memory Management sive. Similar behavior occurs on Windows when watching a video using the Windows Media Player while running a Figure 2: The Redline system. virus scan in the background. Contributions ing applications. This combination makes Redline practical We present Redline, a system that integrates resource man- for use in commodity operating system environments. agement (memory management and disk I/O scheduling) We have implemented Redline as an extension to the with the CPU scheduler, orchestrating these resource man- Linux kernel (Section 7). We present the results of an ex- agers to maximize the responsiveness of interactive appli- tensive empirical evaluation comparing Redline with the cations. standard Linux kernel (Section 8). These results demon- Redline relies on lightweight specifications to provide strate Redline’s effectiveness in ensuring the responsive- enough information about the response time requirements ness of interactive applications even in the face of extreme of interactive applications. These specifications, which ex- workloads, including bursty I/O-heavy background pro- tend Rialto’s CPU specifications [15], give an estimate of cesses, fork bombs, and memory bombs. the resources required by an application over any period in which they are active. These specifications are concise, 2 Redline Overview consisting of just a few parameters (Section 3), and are This paper focuses on Redline’s support for interactive and straightforward to generate: a graduate student was able to best-effort tasks: write specifications for a suite of about 100 applications— including Linux’s latency-sensitive daemons—in just one 1. Interactive (Iact): response-time sensitive tasks that day. In an actual deployment, we expect these specifica- provide services in response to external requests or tions to be provided by application developers. events. These include not only tasks that interact with Each resource manager uses the specifications to in- users, but also tasks that serve requests from other form its decisions. Redline extends a standard time-sharing tasks, such as kernel daemons; CPU scheduler with an earliest deadline first (EDF)-based scheduler [18] that uses these specifications to schedule in- 2. Best-effort (BE): tasks whose performance is not crit- teractive applications (Section 6). Redline’s memory man- ical, such as virus scanners. ager protects the working sets of interactive applications, preferentially evicting pages from non-interactive applica- Figure 2 presents an overview of the Redline system. At tions and further reducing the risk of paging by maintaining the top, the specification management allows a system ad- a pool of free pages available only to interactive tasks—a ministrator to provide specifications for a set of important rate-controlled memory reserve (Section 4). Redline’s disk applications. Redline loads each specification from a file I/O manager avoids pauses in interactive applications by whenever the corresponding application is launched. Red- dynamically prioritizing these tasks according to their need line treats any application without a specification as a best- to complete the I/O operation and resume execution on the effort task. CPU (Section 5). Whenever a new task is launched, Redline performs ad- Unlike real time systems that sacrifice system utilization mission control to determine whether the system can ac- in exchange for strict guarantees [15, 16], Redline provides commodate it. Specifically, Redline dynamically tracks the strong isolation for interactive applications while ensuring load consumed by the active interactive tasks, and then uses high system utilization. Furthermore, Redline works with the new task’s specification to determine whether the re- standard APIs and does not require any alterations to exist- sources are available to support it as an interactive task. 74 8th USENIX Symposium on Operating Systems Design and Implementation USENIX Association Once the admission control mechanism accepts a task, exec() fork() Redline propagates its specification to the memory man- N copy spec ager, the disk I/O manager, and the CPU scheduler. The parent has spec? from its parent memory manager uses the specification to protect the task’s Y working set, preferentially evicting either non-working-set find a match spec Y call exec() within 1ms? pages or pages from best-effort tasks. It also maintains a in /etc/spec.tab? N N Y specially controlled pool of free pages for interactive tasks, parent has the load spec thus isolating them from best-effort tasks that allocate ag- Y inheritable flag set? gressively. The disk I/O management assigns higher pri- N orities to interactive tasks, ensuring that I/O requests from To admission test Launch

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us