Analysis of Event Processing Design Patterns and Their Performance Dependency on I/O Notification Mechanisms
Software design patterns reflect software engineering practices and experience by documenting proven design solutions. We consider here two widely used patterns, the Half-Sync/Half-Async and the Leader/Followers pattern, which aim for efficient processing of messages in multi-core environments.
We will analyze the performance differences not only between both design patterns but also between different implementation variants. These variants use different event notification mechanisms which are used to sense message arrivals on a set of connections. We will show that performance depends not simply on data sharing or lock contention but on the selected event notification primitives and their specific characteristics.
In more detail, we evaluated both patterns in terms of three different event notification mechanisms: select, level-triggered and edge-triggered epoll. The latter two are the operation modes of the epoll API. In particular, the right choice of the API can influence the performance by a factor of two. Secondly, the more recent epoll is overall faster, but in some aspects slower which strongly degrades the Half-Sync/Half-Async performance. Existing performance evaluations for these patterns do not analyze their multi-core performance. Furthermore, they do not include analysis of bottlenecks, data sharing, or operating system primitives.
KeywordsDesign Pattern System Call Pseudo Code Event Source Incoming Message
Unable to display preview. Download preview PDF.
- 1.Gammo, L., Brecht, T., Shukla, A., Pariag, D.: Comparing and evaluating epoll, select, and poll event mechanisms. In: Proceedings of the Ottawa Linux Symposium (2004)Google Scholar
- 2.Harkema, M., Gijsen, B., van der Mei, R., Hoekstra, Y.: Middleware performance: A quantitative modeling approach (2004)Google Scholar
- 3.Harrison, N., Avgeriou, P.: Analysis of architecture pattern usage in legacy system architecture documentation. In: Seventh Working IEEE/IFIP Conference on Software Architecture, WICSA 2008, pp. 147–156 (2008)Google Scholar
- 4.Hu, J., Pyarali, I., Schmidt, D.: Measuring the impact of event dispatching and concurrency models on web server performance over high-speed networks. In: IEEE Global Telecommunications Conference, GLOBECOM 1997, vol. 3, pp. 1924–1931 (November 1997)Google Scholar
- 5.Hu, J., Pyarali, I., Schmidt, D.C.: Applying the proactor pattern to high-performance web servers. In: Proceedings of the 10th International Conference on Parallel and Distributed Computing and Systems (1998)Google Scholar
- 6.Kegel, D.: The c10k problem, http://www.kegel.com/c10k.html
- 10.Schmidt, D.C., Stal, M., Rohnert, H., Buschmann, F.: Pattern-Oriented Software Architecture. Patterns for Concurrent and Networked Objects, vol. 2. John Wiley & Sons (2000)Google Scholar
- 11.von Behren, R., Condit, J., Brewer, E.: Why events are a bad idea (for high-concurrency servers). In: Proceedings of HotOS IX (2003)Google Scholar
- 12.Willmann, P., Rixner, S., Cox, A.L.: An evaluation of network stack parallelization strategies in modern operating systems. In: Proceedings of the Annual conference on USENIX 2006 Annual Technical Conference, pp. 8–8. USENIX Association, Berkeley (2006)Google Scholar
- 13.Zhang, Y., Gill, C., Lu, C.: Real-time performance and middleware for multiprocessor and multicore linux platforms. In: 15th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications, RTCSA 2009, pp. 437–446 (2009)Google Scholar