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.
- Intel xeon processor e7- 8800/4800/2800 product families, volumn 2. 2011. URL http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/xeon-e7-8800-4800-2800-families-vol-2-datasheet.pdf.Google Scholar
- A. Alexeev. nginx. In The Architecture of Open Source Applications, Datasheet Volume 2. 2012. URL http://www.aosabook.org/en/nginx.html.Google Scholar
- J. Armstrong. Programming Erlang: Software for a ConcurrentWorld. 2007. Google ScholarDigital Library
- I. Balbaert. The Way to Go: A Thorough Introduction to the Go Programming Language. 2012. Google ScholarDigital Library
- J. Epstein, A. P. Black, and S. Peyton-Jones. Towards Haskell in the Cloud. In Proceedings of the 4th ACM symposium on Haskell, Haskell'11, pages 118--129, 2011. Google ScholarDigital Library
- D. Jones, Jr., S. Marlow, and S. Singh. Parallel performance tuning for haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, Haskell '09, pages 81--92, 2009. Google ScholarDigital Library
- J. Lemon. Kqueue - A Generic and Scalable Event Notification Facility. In the FREENIX Track: 2001 USENIX Annual Technical Conference, pages 141--153, 2001. Google ScholarDigital Library
- D. Libenzi. Improving (network) I/O performance, 2001. URL http://www.xmailserver.org/linux-patches/nio-improve.html.Google Scholar
- S. Marlow and S. Peyton Jones. The Glasgow Haskell Compiler. In The Architecture of Open Source Applications, Volume 2. 2012. URL http://www.aosabook.org/en/ghc.html.Google Scholar
- S. Marlow, S. Peyton Jones, and W. Thaller. Extending the Haskell Foreign Function Interface with Concurrency. In Proceedings of the Haskell Workshop, 2004. Google ScholarDigital Library
- S. Marlow, S. Peyton Jones, and S. Singh. Runtime Support for Multicore Haskell. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP '09, pages 65--78, 2009. Google ScholarDigital Library
- S. Marlow et al. Haskell 2010 Language Report, 2010.Google Scholar
- N. McKeown, T. Anderson, H. Balakrishnan, G. Parulkar, L. Peterson, J. Rexford, S. Shenker, and J. Turner. OpenFlow: Enabling Innovation in Campus Networks. SIGCOMM Comput. Commun. Rev., 2008. Google ScholarDigital Library
- S. P. Molloy and C. Lever. Accept() scalability on Linux. In ATEC '00 Proceedings of the annual conference on USENIX Annual Technical Conference, 2000. Google ScholarDigital Library
- B. O'Sullivan and J. Tibell. Scalable I/O Event Handling for GHC. In Proceedings of the 2010 ACM SIGPLAN Haskell Symposium (Haskell'10), pages 103--108, 2010. Google ScholarDigital Library
- S. Peyton Jones, A. Gordon, and S. Finne. Concurrent Haskell. In Proceedings of 23rd ACM Symposium on Principles of Programming Languages, pages 295--308, 1996. Google ScholarDigital Library
- M. Snoyman. Warp: A Haskell Web Server, 2011. URL http://steve.vinoski.net/pdf/IC-Warp_a_Haskell_Web_Server.pdf.Google Scholar
- W. Stevens, B. Fenner, and A. M. Rudoff. UNIX Network Programming. Addison-Wesley Professional, 2004. Google ScholarDigital Library
- A. Tootoonchian, S. Gorbunov, Y. Ganjali, M. Casado, and R. Sherwood. On controller performance in software-defined networks. In Hot-ICE, 2012. Google ScholarDigital Library
- A. Voellmy and J. Wang. Scalable software defined network controllers. SIGCOMM Comput. Commun. Rev., 42(4):289--290, Aug. 2012. Google ScholarDigital Library
- R. von Behren, J. Condit, and E. Brewer. Why Events Are A Bad Idea (for High-Concurrency Servers). In Proceedings of the 9th conference on Hot Topics in Operating Systems - Volume 9, HOTOS'03, 2003. Google ScholarDigital Library
- M. Welsh, D. Culler, and E. Brewer. SEDA: An Architecture for Well-Conditioned, Scalable Internet Services. In Proceedings of the Eighteenth Symposium on Operating Systems Principles (SOSP-18), October 2001. Google ScholarDigital Library
- K. Yamamoto. Mighttpd - a High Performance Web Server in Haskell. In The Monad.Reader Issue 19. 2011.Google Scholar
- Y. Zhao, J. Shi, K. Zheng, H. Wang, H. Lin, and L. Shao. Allocation wall: a limiting factor of java applications on emerging multi-core platforms. In Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, OOPSLA '09, pages 361--376, 2009. Google ScholarDigital Library
Index Terms
- Mio: a high-performance multicore io manager for GHC
Recommendations
A high-performance multicore IO manager based on libuv (experience report)
Haskell 2018: Proceedings of the 11th ACM SIGPLAN International Symposium on HaskellWe present a high performance multicore I/O manager based on libuv for Glasgow Haskell Compiler (GHC). The new I/O manager is packaged as an ordinary Haskell package rather than baked into GHC's runtime system(GHC RTS), yet takes advantage of GHC RTS's ...
A high-performance multicore IO manager based on libuv (experience report)
Haskell '18We present a high performance multicore I/O manager based on libuv for Glasgow Haskell Compiler (GHC). The new I/O manager is packaged as an ordinary Haskell package rather than baked into GHC's runtime system(GHC RTS), yet takes advantage of GHC RTS's ...
Mio: a high-performance multicore io manager for GHC
Haskell '13Haskell 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 ...
Comments