Scalability : the Software Problem Jonathan Appavoo, Volkmar Uhlig, and Dilma Da Silva

Scalability : the Software Problem Jonathan Appavoo, Volkmar Uhlig, and Dilma Da Silva

Scalability : The Software Problem Jonathan Appavoo, Volkmar Uhlig, and Dilma da Silva IBM T. J. Watson Research Center fjappavoo,vuhlig,[email protected] 1 Introduction be intrinsic to the workload. For example, a workload For the past several years we have studied how to scale may utilize a single shared file to log all activity of mul- general-purpose system software. System software is tiple processes, or a multi-threaded application may use unique, from a software perspective, in its requirement a shared data array across multiple processors. Second, to support and enable parallelism rather than exploiting it sharing also arises from the data structures and algo- to improve its own performance. System software must rithms employed in the design and implementation of ensure good overall system utilization and high degree the system software. For example, an operating system of parallelism for those applications that demand it. To may be designed to manage all physical memory as a do this, system software must: (i) utilize the character- single shared pool and implement this management us- istics of the hardware to exploit parallelism in general- ing shared data structures. Third, sharing can occur in purpose workloads, and (ii) facilitate concurrent applica- the physical design and protocols utilized by the hard- tions, which includes providing models and mechanisms ware. For example, a system utilizing a single mem- for applications to exploit the parallelism available in the ory bus and snooping-based cache coherence protocol re- hardware. quires shared-bus arbitration and global communication Based on previous experience in constructing scalable for memory access, even for data located in independent hardware and associated operating systems [1,5,6,9–12] memory modules. we designed a software structure aimed at better suiting Achieving scalable performance requires minimizing the underlying structure of a scalable SMMP (Shared- all forms of sharing, which is also referred to as maxi- Memory Multi-Processor) architecture: when additional mizing locality. On SMMPs, locality refers to the degree workload is presented to the system, additional hardware to which locks are contended and data — including the resources can be efficiently utilized to service the load locks themselves — are shared amongst threads running increase. Controlling and managing communication is on different processors. The less contention on locks and ultimately the key to scalability therefore we focused on the less data is shared, the higher the locality. Maximiz- locality — avoiding inter-processor communication — ing locality on SMMPs is critical, because even minute by carefully limiting shared data access. amounts of (possibly false) sharing can have a profound We adopted four key design principles: negative impact on performance and scalability [3, 5]. 1. Avoid off-processor communication in the imple- 2 Concurrency =6 Scalability mentation of communication and scheduling facil- A common conception is to assume that software that ities. is implemented to be concurrent is scalable. This, how- 2. Use a runtime memory structure that scales with ever, is not true. Traditionally, software is considered to hardware resources and workload demands in a way be concurrent if it uses fine-grain synchronization. The to to ensure efficient and controlled memory con- intent is to construct software which is correct in the face sumption and communication. of concurrent execution, but utilizes mutual exclusion in a manner that critical sections have small lock-hold 3. Avoids communication overheads when there is no times. This approach ignores the inherently non-scalable logical sharing in the workload — avoiding shared runtime structure that such software has with respect to meta-structures and false sharing. memory access and, hence, communication. 4. Despite targeting SMMPs, use distributed data structures to control communication when there is Scalable End-to-End Performance In order not hin- a demand for shared-resource access. der overall system or individual application performance, it is critical for system software to reflect the parallelism “Sharing” lies at the heart of the problem. By its very of the workloads and individual applications. This point nature, sharing introduces barriers to scalability and it is often overlooked. Smith alludes to the requirements can come from three main sources: First, sharing can of individual applications, noting that the tension be- 1 tween protection and performance is particularly salient 4 Operating System and General-Purpose and difficult in a parallel system and that the paral- System Software Scalability lelism in one protection domain must be reflected in an- For scalable software design we employed three concepts other [8]. In other words, to ensure that a parallel appli- as our core building blocks: cation within one protection domain can realize its poten- tial performance, all services in the system domains that Events: All activity in the system software can be the concurrent application depends on must be provided viewed as requests that induce short-lived events. in an equally parallel fashion. It is worth noting that this The event is created at the beginning of a system re- is true not only for individual applications, but also for quest and does not block for IO. The event satisfies all applications forming the current workload on a par- the request by traversing and potentially manipulat- allel system: the demands of all concurrently executing ing system data structures. All long-lived work is applications must be satisfied with equal parallelism in programmed by continuations. order to ensure good overall system performance. Locality Domains: Virtual processors and memory pools are associated with physical processors and memory modules. Events are bound to virtual pro- cessors and memory pools. 3 Virtualization and Scalability Object Decomposition: We have observed that there is a similarity between the runtime structure result- As stated above, to achieve good scalability it is neces- ing from an object-oriented design and the runtime sary that all software executed to satisfy a desired task structure of scalable system software. Object ori- scale with respect to the underlying communication ca- entation can result in a runtime where each unique pacity and resources of the system. As such, the locality software resource instance has a unique identifier of resource access must be reflected across all protection and separate memory allocation, and is dynamically boundaries and software layers. If any of the layers in created. These properties can be leveraged to con- the software stack does not scale, the overall system is struct software that has a natural model for scaling likely to not scale. with increases in workload and hardware resources. Each protection layer poses a scalability challenge: These concepts are further accompanied by the fol- strict separation by a protection boundary introduces a lowing four mechanisms. These mechanisms were im- semantic boundary about dependence and independence plemented and evaluated in the K42 research operating of software components. The protection boundary re- sytem [2, 7]. stricts the flow of semantic information on the degree of concurrency, frequency of access, locality, and structur- Protected Procedure Call : A client-server model is ing of refined resources provided in bulk by the lower used in K42 to represent and service the demand layers. While a hypervisor mitigates management of or load on the system. A system service is placed low-level resources such as memory pages and processor within an appropriate protection domain (address time slices, an operating system refines such resources space) and clients make requests to the service via a into buffer caches, short- and long-lived code and data Protected Procedure Call (PPC). Like the Tornado pages, thread-control blocks, linked lists, inode entries, PPC [5], a call from a client to a server acts like a etc. Each of these higher-level constructs have specific procedure call that crosses from one address space usage scenarios and thus access and communication pat- to another and then back with the following proper- terns [4]. ties: Only by careful design of the interfaces we can bridge 1. client requests are always serviced on their lo- the semantic gap between the software layers. When cal processor, managing bulk resources such as memory pages, we ex- 2. clients and servers shared the processor in a plicitly maintain locality information — degree of paral- manner similar to handoff scheduling, and lelism and processor sets — with the resource [9]. Addi- 3. there are as many threads of control in the tionally, we allow for dynamic adaptation of the synchro- server as the client request. nization primitives at runtime. For hypervisors, dynamic adaptability is a key requirement since virtual machines Locality Aware Dynamic Memory Allocation : Dy- are typically long-lived objects and resources managed namic memory allocation is extensively used in the through the hypervisor get re-assigned for other pur- construction of K42 services to ensure that mem- poses. ory resources grow with demand both in size and 2 location. The K42 memory allocators employ per- mentation of a performance counter, where each proces- processor pools to ensure that memory allocations sor is assigned its own local padded sub-counter, ensures can be localized to the processors on which the al- that updates to the counter result

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 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