Mio: a high-performance multicore io manager for GHC

  • Authors:
  • Andreas Richard Voellmy;Junchang Wang;Paul Hudak;Kazuhiko Yamamoto

  • Affiliations:
  • Yale University, New Haven, CT, USA;Yale University, New Haven, CT, USA;Yale University, New Haven, CT, USA;IIJ Innovation Institute Inc., Tokyo, Japan

  • Venue:
  • Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Haskell threads provide a key, lightweight concurrency abstraction to simplify the programming of important network applications such as web servers and software-defined network (SDN) controllers. The flagship Glasgow Haskell Compiler (GHC) introduces a run-time system (RTS) to achieve a high-performance multicore implementation of Haskell threads, by introducing effective components such as a multicore scheduler, a parallel garbage collector, an IO manager, and efficient multicore memory allocation. Evaluations of the GHC RTS, however, show that it does not scale well on multicore processors, leading to poor performance of many network applications that try to use lightweight Haskell threads. In this paper, we show that the GHC IO manager, which is a crucial component of the GHC RTS, is the scaling bottleneck. Through a series of experiments, we identify key data structure, scheduling, and dispatching bottlenecks of the GHC IO manager. We then design a new multicore IO manager named Mio that eliminates all these bottlenecks. Our evaluations show that the new Mio manager improves realistic web server throughput by 6.5x and reduces expected web server response time by 5.7x. We also show that with Mio, McNettle (an SDN controller written in Haskell) can scale effectively to 40+ cores, reach a throughput of over 20 million new requests per second on a single machine, and hence become the fastest of all existing SDN controllers.