skip to main content
10.1145/2503778.2503790acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Mio: a high-performance multicore io manager for GHC

Published:23 September 2013Publication History

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.

References

  1. 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 ScholarGoogle Scholar
  2. A. Alexeev. nginx. In The Architecture of Open Source Applications, Datasheet Volume 2. 2012. URL http://www.aosabook.org/en/nginx.html.Google ScholarGoogle Scholar
  3. J. Armstrong. Programming Erlang: Software for a ConcurrentWorld. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. I. Balbaert. The Way to Go: A Thorough Introduction to the Go Programming Language. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Lemon. Kqueue - A Generic and Scalable Event Notification Facility. In the FREENIX Track: 2001 USENIX Annual Technical Conference, pages 141--153, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Libenzi. Improving (network) I/O performance, 2001. URL http://www.xmailserver.org/linux-patches/nio-improve.html.Google ScholarGoogle Scholar
  9. 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 ScholarGoogle Scholar
  10. S. Marlow, S. Peyton Jones, and W. Thaller. Extending the Haskell Foreign Function Interface with Concurrency. In Proceedings of the Haskell Workshop, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Marlow et al. Haskell 2010 Language Report, 2010.Google ScholarGoogle Scholar
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Snoyman. Warp: A Haskell Web Server, 2011. URL http://steve.vinoski.net/pdf/IC-Warp_a_Haskell_Web_Server.pdf.Google ScholarGoogle Scholar
  18. W. Stevens, B. Fenner, and A. M. Rudoff. UNIX Network Programming. Addison-Wesley Professional, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Tootoonchian, S. Gorbunov, Y. Ganjali, M. Casado, and R. Sherwood. On controller performance in software-defined networks. In Hot-ICE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Voellmy and J. Wang. Scalable software defined network controllers. SIGCOMM Comput. Commun. Rev., 42(4):289--290, Aug. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. K. Yamamoto. Mighttpd - a High Performance Web Server in Haskell. In The Monad.Reader Issue 19. 2011.Google ScholarGoogle Scholar
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Mio: a high-performance multicore io manager for GHC

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
              September 2013
              158 pages
              ISBN:9781450323833
              DOI:10.1145/2503778

              Copyright © 2013 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 23 September 2013

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Haskell '13 Paper Acceptance Rate13of33submissions,39%Overall Acceptance Rate57of143submissions,40%

              Upcoming Conference

              ICFP '24

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader