The Scalable Commutativity Rule: Designing Scalable Software for Multicore Processors Austin T. Clements, M. Frans Kaashoek, Nickolai Zeldovich, Robert T. Morris, and Eddie Kohler MIT CSAIL and Harvard University EECS 582 – W1611/27/16
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W162
What is the usual way to evaluate the scalability of multicore software? Workload Plot Scalability Fix bottleneck Differential profile Any drawbacks?
Drawbacks New workloads expose new bottlenecks More cores expose new bottlenecks The real bottlenecks may be in the interface design
Question: Can scalability opportunities be identified even before any implementation exists, simply by considering interface specifications? Yes!
The Scalable Commutativity Rule Whenever interface operations commute, they can be implemented in a way that scales.
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W167
Contributions The scalable commutativity rule Formalization of the rule and proof of its correctness State-dependent, interface-based commutativity Commuter: An automated scalability testing tool Sv6: A scalable POSIX-like kernel
SIM Commutativity The formalism of the rule relies on SIM commutativity Consider a history H = X || Y (where || concatenates action sequences) * Y SI-commutes in H when given any reordering Y’ of Y, and any action sequence Z, X || Y || Z is a well-formed histories iff X || Y’ || Z is also well formed * Y SIM-commutes in H when for any prefix P of some reordering of Y, P SI-commutes in X || P
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W1610
What scales on today’s multicore? We say two or more operations are scalable if they are conflict-free
The intuition behind the rule Whenever interface operations commute, they can be implemented in a way that scales. Operations commute => results independent of order => communication is unnecessary => without communication, no conflicts
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W1613
Commuter Interface specification (e.g., POSIX) All scalability bottlenecks Implementation (e.g., Linux)
Components of Commuter
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W1616
Commuter finds non-scalable cases in Linux
Sv6: A scalable OS POSIX-like operating system File system and virtual memory system follow commutativity rule Implementing using standard parallel programming techniques, but guided by Commuter
Commutative operations can be made to scale
Benchmark throughput in operations per second per core with varying core counts on sv6
Outline Introduce the problem Contributions Define the rule Commuter Evaluation Conclusion EECS 582 – W1621
Conclusion Whenever interface operations commute, they can be implemented in a way that scales. This rule helps developers in building more scalable software starting from interface design and carrying on through implementation, testing, and evaluation.
Q&A