FlexPoll: adaptive event polling for network-intensive applications
Xingbo WU, Xiang LONG, Lei WANG
FlexPoll: adaptive event polling for network-intensive applications
In today’s data centers supporting Internet-scale computing and input/output (I/O) services, increasinglymore network-intensive applications are deployed on the network as a service. To this end, it is critical for the applications to quickly retrieve requests from the network and send their responses to the network. To facilitate this network function, operating system usually provides an event notification mechanism so that the applications (or the library) know if the network is ready to supply data for them to read or to receive data for them to write. As a widely used and representative notification mechanism, epoll in Linux provides a scalable and high-performance implementation by allowing applications to specifically indicate which connections and what events on them need to be watched.
As epoll has been used in some major systems, including key-value (KV) systems, such as Redis and Memcached, and web server systems such as NGINX, we have identified a substantial performance issue in its use. For the sake of efficiency, applications usually use epoll’s system calls to inform the kernel exactly of what events they are interested in and always keep the information up-to-date. However, in a system with demanding network traffic, such a rigid maintenance of the information is not necessary and the excess number of system calls for this purpose can substantially degrade the system’s performance. In this paper, we use Redis as an example to explore the issue. We propose a strategy of informing the kernel of the interest events in a manner adaptive to the current network load, so that the epoll system calls can be reduced and the events can be efficiently delivered. We have implemented an event-polling library, named as FlexPoll, purely in user-level without modifying any kernel code.
Our evaluation on Redis shows that the query throughput can be improved by up to 46.9% on micro-benchmarks, and even up to 67.8% on workloads emulating real-world access patterns. FlexPoll is a generic mechanism thus it can be adopted by other applications in a straightforward manner, such as NGINX and Memcached.
operating systems / performance evaluation and modeling / storage systems and networks / workload characterization
[1] |
Pokomy J. NoSQL databases: a step to database scalability in web environment. International Journal of Web Information Systems, 2013, 9(1): 69–82
|
[2] |
Okman L, Gal-Oz N, Gonen Y, Gudes E, Abramov J. Security issues in NoSQL databases. 2011 IEEE 10th International Conference on Trust, Security and Privacy in Computing and Communications. 2011, 541–547
|
[3] |
Leavitt N. Will NoSQL databases live up to their promise? Computer, 2010, 43(2): 12–14
|
[4] |
DeCandia G, Hastorun D, Jampani M, Kakulapati G, Lakshman A, Sivasubramanian S, Vosshall P, Vogels W. Dynamo: amazon’s highly available key-value store. In: Proceedings of the 21st ACM SIGOPS symposium on Operating systems principles. 2007, 41(6): 205–220
|
[5] |
Chen J J, Douglas C, Mutsuzaki M, Quaid P, Ramakrishnan R, Rao S, Sears R. Walnut: a unified cloud object store. In: Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data. 2012, 743–754
|
[6] |
Pirzadeh P, Tatemura J, Po O, Hacıgümü H. Performance evaluation of range queries in key value stores. Journal of Grid Computing, 2012, 10(1): 109–132
|
[7] |
Atikoglu B, Xu Y H, Frachtenberg E, Jiang S, Paleczny M. Workload analysis of a large-scale key-value store. In: Proceedings of the 12th ACM SIGMETRICS/PERFORMANCE Joint International Conference on Measurement and Modeling of Computer Systems. 2012, 40(1): 53–64
|
[8] |
Geambasu R, Levy A A, Kohno T, Krishnamurthy A, Levy H M. Comet: an active distributed key-value store. In: Proceedings of the 9th USENIX Symposium on Operating Systems Design and Implementation. 2010, 323–336
|
[9] |
Debnath B, Sengupta S, Li J. FlashStore: high throughput persistent key-value store. Proceedings of the VLDB Endowment, 2010, 3(1–2): 1414–1425
|
[10] |
Lim H, Fan B, Andersen D G, Kaminsky M. SILT: a memory-efficient, high-performance key-value store. In: Proceedings of the 23rd ACM Symposium on Operating Systems Principles. 2011, 1–13
|
[11] |
Debnath B, Sengupta S, Li J. SkimpyStash: RAM space skimpy keyvalue store on flash-based storage. In: Proceedings of the 2011 ACM SIGMOD International Conference on Management of data. 2011, 25–36
|
[12] |
Andersen D G, Franklin J, Kaminsky M, Phanishayee A, Tan L, Vasudevan V. FAWN: a fast array of wimpy nodes. In: Proceedings of the 22nd ACM SIGOPS Symposium on Operating systems principles. 2009, 1–14
|
[13] |
Badam A, Park K S, Pai V S, Peterson L L. HashCache: cache storage for the next billion. In: Proceedings of the 6th USENIX Symposium on Networked System Design and Implementation. 2009, 123–136
|
[14] |
Anand A, Muthukrishnan C, Kappes S, Akella A, Nath S. Cheap and large CAMs for high performance data-intensive networked systems. In: Proceedings of the 7th USENIX Symposium on Networked Sys tem Design and Implementation. 2010, 29
|
[15] |
Debnath B K, Sengupta S, Li J. ChunkStash: speeding up inline storage deduplication using flash memory. In: Proceedings of USENIX Annual Technical Conference. 2010, 16
|
[16] |
Escriva R, Wong B, Sirer E G. HyperDex: A distributed, searchable key-value store. ACM SIGCOMM Computer Communication Review, 2012, 42(4): 25–36
|
[17] |
Banga G, Mogul J C, Druschel P. A scalable and explicit event delivery mechanism for UNIX. In: Proceedings of the annual conference on USENIX Annual Technical Conference. 1999, 253–265
|
[18] |
Gammo L, Brecht T, Shukla A, Panag D. Comparing and evaluating epoll, select, and poll event mechanisms. In: In Proceedings of the Ottawa Linux Symposium. 2004, 215
|
[19] |
Shukla A, Li L, Subramanian A, Ward P A S, Brecht T. Evaluating the performance of user-space and kernel-space web servers. In: Proceedings of the 2004 conference of the Centre for Advanced Studies on Collaborative research. 2004, 189–201
|
[20] |
Vicente E, Matias R, Borges L, Macêdo A. Evaluation of compound system calls in the Linux kernel. ACM SIGOPS Operating Systems Review, 2012, 46(1): 53–63
|
[21] |
Soares L, Stumm M. Exception-less system calls for event-driven servers. USENIX Annual Technical Conference. 2011, 10
|
[22] |
Soares L, Stumm M. FlexSC: flexible system call scheduling with exception-less system calls. In: Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation. 2010, 1–8
|
/
〈 | 〉 |