|
ABSTRACT
This paper presents Capriccio, a scalable thread package for use with high-concurrency servers. While recent work has advocated event-based systems, we believe that thread-based systems can provide a simpler programming model that achieves equivalent or superior performance.By implementing Capriccio as a user-level thread package, we have decoupled the thread package implementation from the underlying operating system. As a result, we can take advantage of cooperative threading, new asynchronous I/O mechanisms, and compiler support. Using this approach, we are able to provide three key features: (1) scalability to 100,000 threads, (2) efficient stack management, and (3) resource-aware scheduling.We introduce linked stack management, which minimizes the amount of wasted stack space by providing safe, small, and non-contiguous stacks that can grow or shrink at run time. A compiler analysis makes our stack implementation efficient and sound. We also present resource-aware scheduling, which allows thread scheduling and admission control to adapt to the system's current resource usage. This technique uses a blocking graph that is automatically derived from the application to describe the flow of control between blocking points in a cooperative thread package. We have applied our techniques to the Apache 2.0.44 web server, demonstrating that we can achieve high performance and scalability despite using a simple threaded programming model.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
 |
2
|
|
| |
3
|
A. W. Appel and D. B. MacQueen. Standard ML of New Jersey. In Proceedings of the 3rd International Symposium on Programming Language Implementation and Logic Programming, pages 1--13, 1991.
|
| |
4
|
A. W. Appel and Z. Shao. An empirical and analytic study of stack vs. heap cost for languages with closures. Journal of Functional Programming, 6(1):47--74, Jan 1996.
|
 |
5
|
Brian N. Bershad , Craig Chambers , Susan Eggers , Chris Maeda , Dylan McNamee , Przemyslaw Pardyak , Stefan Savage , Emin Gün Sirer, SPIN: an extensible microkernel for application-specific operating system services, Proceedings of the 6th workshop on ACM SIGOPS European workshop: Matching operating systems to application needs, September 12-14, 1994, Wadern, Germany
[doi> 10.1145/504390.504408]
|
 |
6
|
|
| |
7
|
Robert D. Blumofe , Christopher F. Joerg , Bradley C. Kuszmaul , Charles E. Leiserson , Keith H. Randall , Yuli Zhou, Cilk: an efficient multithreaded runtime system, Journal of Parallel and Distributed Computing, v.37 n.1, p.55-69, Aug. 25, 1996
[doi> 10.1006/jpdc.1996.0107]
|
 |
8
|
|
| |
9
|
|
| |
10
|
A. Chankhunthod, P. B. Danzig, C. Neerdaels, M. F. Schwartz, and K. J. Worrell. A Hierarchical Internet Object Cache. In Proceedings of the 1996 Usenix Annual Technical Conference, January 1996.
|
 |
11
|
|
| |
12
|
J. Cordina. Fast multithreading on shared memory multiprocessors. Technical report, University of Malta, June 2000.
|
 |
13
|
D. R. Engler , M. F. Kaashoek , J. O'Toole, Jr., Exokernel: an operating system architecture for application-level resource management, Proceedings of the fifteenth ACM symposium on Operating systems principles, p.251-266, December 03-06, 1995, Copper Mountain, Colorado, United States
|
 |
14
|
David Gay , Philip Levis , Robert von Behren , Matt Welsh , Eric Brewer , David Culler, The nesC language: A holistic approach to networked embedded systems, Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, June 09-11, 2003, San Diego, California, USA
|
| |
15
|
S. C. Goldstein, K. E. Schauser, and D. E. Culler. Lazy Threads, Stacklets, and Synchronizers: Enabling primitives for compiling parallel languages. In Third Workshop on Langauges, Compilers, and Run-Time Systems for Scalable Computers, 1995.
|
| |
16
|
T. Hun. Minimal Context Thread 0.7 manual. http://www.aranetwork.com/docs/mct-manual.pdf, 2002.
|
| |
17
|
B. LaHaise. Linux AIO home page. http://www.kvack.org/blah/aio/.
|
| |
18
|
H. C. Lauer and R. M. Needham. On the duality of operating system structures. In Second Inernational Symposium on Operating Systems, IR1A, October 1978.
|
| |
19
|
|
| |
20
|
D. Libenzi. Linux epoll patch. http://www.xmailserver.org/linux-patches/nio-improve.html.
|
| |
21
|
D. McNamee and K. Armstrong. Extending the Mach external pager interface to accommodate user-level page replacement policies. Technical Report TR-90-09-05, University of Washington, 1990.
|
| |
22
|
|
| |
23
|
|
 |
24
|
|
| |
25
|
J. K. Ousterhout. Why Threads Are A Bad Idea (for most purposes). Presentation given at the 1996 Usenix Annual Technical Conference, January 1996.
|
| |
26
|
V. S. Pai, P. Druschel, and W. Zwaenepoel. Flash: An Efficient and Portable Web Server. In Proceedings of the 1999 Annual Usenix Technical Conference, June 1999.
|
| |
27
|
|
| |
28
|
W. Pang and S. D. Goodwin. An algorithm for solving constraint-satisfaction problems.
|
 |
29
|
Margo I. Seltzer , Yasuhiro Endo , Christopher Small , Keith A. Smith, Dealing with disaster: surviving misbehaved kernel extensions, Proceedings of the second USENIX symposium on Operating systems design and implementation, p.213-227, October 29-November 01, 1996, Seattle, Washington, United States
|
 |
30
|
|
| |
31
|
|
| |
32
|
E. Toernig. Coroutine library source. http://www.goron.de/froese/coro/.
|
| |
33
|
Unknown. Accellerating Apache project. http://aap.sourceforge.net/.
|
| |
34
|
Unknown. State threads for Internet applications. http://state-threads.sourceforge.net/docs/st.html.
|
| |
35
|
J. Robert von Behren , Eric A. Brewer , Nikita Borisov , Michael Chen , Matt Welsh , Josh MacDonald , Jeremy Lau , David E. Culler, Ninja: A Framework for Network Services, Proceedings of the General Track: 2002 USENIX Annual Technical Conference, p.87-102, June 10-15, 2002
|
| |
36
|
R. von Behren, J. Condit, and E. Brewer. Why events are a bad idea (for high-concurrency servers). In Proceedings of the 2003 HotOS Workshop, May 2003.
|
 |
37
|
T. von Eicken , A. Basu , V. Buch , W. Vogels, U-Net: a user-level network interface for parallel and distributed computing (includes URL), Proceedings of the fifteenth ACM symposium on Operating systems principles, p.40-53, December 03-06, 1995, Copper Mountain, Colorado, United States
|
 |
38
|
Matt Welsh , David Culler , Eric Brewer, SEDA: an architecture for well-conditioned, scalable internet services, Proceedings of the eighteenth ACM symposium on Operating systems principles, October 21-24, 2001, Banff, Alberta, Canada
|
CITED BY 45
|
|
|
|
|
Surupa Biswas , Matthew Simpson , Rajeev Barua, Memory overflow protection for embedded systems using run-time checks, reuse and compression, Proceedings of the 2004 international conference on Compilers, architecture, and synthesis for embedded systems, September 22-25, 2004, Washington DC, USA
|
|
|
Luca de Alfaro , Vsihwanath Raman , Marco Faella , Rupak Majumdar, Code aware resource management, Proceedings of the 5th ACM international conference on Embedded software, September 18-22, 2005, Jersey City, NJ, USA
|
|
|
Aravind Menon , Jose Renato Santos , Yoshio Turner , G. (John) Janakiraman , Willy Zwaenepoel, Diagnosing performance overheads in the xen virtual machine environment, Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, June 11-12, 2005, Chicago, IL, USA
|
|
|
Bhuvan Middha , Matthew Simpson , Rajeev Barua, MTSS: multi task stack sharing for embedded systems, Proceedings of the 2005 international conference on Compilers, architectures and synthesis for embedded systems, September 24-27, 2005, San Francisco, California, USA
|
|
|
Petros Efstathopoulos , Maxwell Krohn , Steve VanDeBogart , Cliff Frey , David Ziegler , Eddie Kohler , David Mazières , Frans Kaashoek , Robert Morris, Labels and event processes in the asbestos operating system, ACM SIGOPS Operating Systems Review, v.39 n.5, December 2005
|
|
|
|
|
|
|
|
|
Steve Vandebogart , Petros Efstathopoulos , Eddie Kohler , Maxwell Krohn , Cliff Frey , David Ziegler , Frans Kaashoek , Robert Morris , David Mazières, Labels and event processes in the Asbestos operating system, ACM Transactions on Computer Systems (TOCS), v.25 n.4, p.11-es, December 2007
|
|
|
|
|
|
Zachary Anderson , Eric Brewer , Jeremy Condit , Robert Ennals , David Gay , Matthew Harren , George C. Necula , Feng Zhou, Beyond bug-finding: sound program analysis for Linux, Proceedings of the 11th USENIX workshop on Hot topics in operating systems, p.1-6, May 07-09, 2007, San Diego, CA
|
|
|
Sang Seok Lim , Jong Hyuk Choi , Hubertus Franke , Kurt D. Zeilenga, Improving connection management of the OpenLDAP directory server, Proceedings of the 24th IASTED international conference on Parallel and distributed computing and networks, p.225-230, February 14-16, 2006, Innsbruck, Austria
|
|
|
|
|
|
|
|
|
Adam Dunkels , Oliver Schmidt , Thiemo Voigt , Muneeb Ali, Protothreads: simplifying event-driven programming of memory-constrained embedded systems, Proceedings of the 4th international conference on Embedded networked sensor systems, October 31-November 03, 2006, Boulder, Colorado, USA
|
|
|
|
|
|
Surupa Biswas , Thomas Carley , Matthew Simpson , Bhuvan Middha , Rajeev Barua, Memory overflow protection for embedded systems using run-time checks, reuse, and compression, ACM Transactions on Embedded Computing Systems (TECS), v.5 n.4, p.719-752, November 2006
|
|
|
Shigeru Kusakabe , Mitsuhiro Aono , Masaaki Izumi , Satoshi Amamiya , Yoshinari Nomura , Hideo Taniguchi , Makoto Amamiya, Scalability of continuation-based fine-grained multithreading in handling multiple I/O requests on FUCE, Proceedings of the 4th international conference on Computing frontiers, May 07-09, 2007, Ischia, Italy
|
|
|
|
|
|
Shiding Lin , Aimin Pan , Zheng Zhang , Rui Guo , Zhenyu Guo, WiDS: an integrated toolkit for distributed system development, Proceedings of the 10th conference on Hot Topics in Operating Systems, p.17-17, June 12-15, 2005, Santa Fe, NM
|
|
|
|
|
|
|
|
|
|
|
|
Khaled Elmeleegy , Anupam Chanda , Alan L. Cox , Willy Zwaenepoel, Lazy asynchronous I/O for event-driven servers, Proceedings of the USENIX Annual Technical Conference 2004 on USENIX Annual Technical Conference, p.21-21, June 27-July 02, 2004, Boston, MA
|
|
|
|
|
|
Bratin Saha , Ali-Reza Adl-Tabatabai , Anwar Ghuloum , Mohan Rajagopalan , Richard L. Hudson , Leaf Petersen , Vijay Menon , Brian Murphy , Tatiana Shpeisman , Eric Sprangle , Anwar Rohillah , Doug Carmean , Jesse Fang, Enabling scalability and performance in a large scale CMP environment, ACM SIGOPS Operating Systems Review, v.41 n.3, June 2007
|
|
|
|
|
|
|
|
|
|
|
|
Galen Hunt , Mark Aiken , Manuel Fähndrich , Chris Hawblitzel , Orion Hodson , James Larus , Steven Levi , Bjarne Steensgaard , David Tarditi , Ted Wobber, Sealing OS processes to improve dependability and safety, ACM SIGOPS Operating Systems Review, v.41 n.3, June 2007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Úlfar Erlingsson , Martín Abadi , Michael Vrable , Mihai Budiu , George C. Necula, XFI: software guards for system address spaces, Proceedings of the 7th symposium on Operating systems design and implementation, November 06-08, 2006, Seattle, Washington
|
|
|
Kevin Klues , Vlado Handziski , Chenyang Lu , Adam Wolisz , David Culler , David Gay , Philip Levis, Integrating concurrency control and energy management in device drivers, ACM SIGOPS Operating Systems Review, v.41 n.6, December 2007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|