next up previous
Next: Bibliography Up: A Scalable Locality-Aware Event Previous: Temporal-locality-aware poll


Performance Evaluation

On our modified memory-based event-driven web server, three event dispatching mechanisms: poll(), temporal locality-aware poll and RT signals are implemented. Parameters of the web server are optimized for each event dispatching mechanisms to be tested. Server sleep frequency is fine tuned for maximum performance. Our server does multiple accept() on a listening socket descriptor when poll() reports a ready event on the descriptor. This strategy minimizes the effect of the overhead on poll(). Because more connections are accepted and more useful works will be identified by follow-up poll().

(a)Reply Rate
(b)Request Rate

Figure 2: Performance with 6000 idle connections

To observe the behavior of FDM library and RT signals as in Figure 2, we increase the number of idle connections to 6000. The advantage of FDM is clear and obvious. FDM-based web server delivers highest throughput and shortest response time. However, it is surprising that the performance of RT signals(poll) falls behind even that of traditional poll() when request rate are greater than 4000 req/sec. The reason is because we use poll() to handle lost event when the signal queue is overflowed. To use poll() with RT signals, web server has to prepare and maintain a pollfd array for such signal queue overflow emergency. Rearranging this pollfd array on every several calls and the timeout time-stamp array is costly in proportion to number of idle connections. At 6000 idle connections, RT signals web server spends much more time on the work we just mentioned than the time spent at 1000 idle connections. When client request rate is greater than 4000 req/sec, signal arrival rate become faster than signal dequeue rate. This results in many SIGIO signal queue overflow events and significantly increase of response time. This performance drop scenario can't be observed when server is loaded with just 1000 idle connection. Figure 2 also shows the performance improvement of RT signals(select) over RT signals(poll). The reply rate and the response time of RT signals(select) is the best over all event dispatching mechanisms when request rate is smaller than 8000 req/sec. When request rate is greater than 8000 req/sec, excessively switching back and forth between RT signals and select() when RT signal queue is overflowed makes the performance drop. The performance of FDM also starts overtaking RT signals (select) at 8000 req/sec. RT signal queue overflow problem greatly influences the performance of both RT signals(poll) and RT signals(select) at different load. To conclude this paper, we proposed a user-mode library solution extends poll() by exploiting temporal locality property among events in a file descriptor. Each descriptor is associated with a live counter and polling frequency of a descriptor is determined by the counter. We have shown that this scheme performs pretty well on a large number of idle connections.
next up previous
Next: Bibliography Up: A Scalable Locality-Aware Event Previous: Temporal-locality-aware poll
2003-03-23