Abstract
The Actor-based programming model is largely used in the context of distributed systems for its message-passing semantics and neat separation between the concurrency model and the underlying hardware platform. However, in the context of a single multi-core node where the performance metric is the primary optimization objective, the “pure” Actor Model is generally not used because Actors cannot exploit the physical shared-memory, thus reducing the optimization options. In this work, we propose to enrich the Actor Model with some well-known Parallel Patterns to face the performance issues of using the “pure” Actor Model on a single multi-core platform. In the experimental study, conducted on two different multi-core systems by using the C++ Actor Framework, we considered a subset of the Parsec benchmarks and two Savina benchmarks. The analysis of results demonstrates that the Actor Model enriched with suitable Parallel Patterns implementations provides a robust abstraction layer capable of delivering performance results comparable with those of thread-based libraries (i.e. Pthreads and FastFlow) while offering a safer and versatile programming environment.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig1_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Figa_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig2_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Figb_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig3_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig4_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig5_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig6_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig7_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig8_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig9_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig10_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig11_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10766-020-00663-1/MediaObjects/10766_2020_663_Fig12_HTML.png)
Similar content being viewed by others
Notes
The implementations are available at https://github.com/ParaGroup/caf-pp.
Application code available at https://github.com/ParaGroup/caf-pp.
Application code available in the \(\hbox {P}^3\)ARSEC repository at https://github.com/ParaGroup/p3arsec.
References
Agha, G.A.: Actors: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge (1986)
Agha, G.A., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. J. Funct. Program. 7(1), 1–72 (1997)
Aldinucci, M., Danelutto, M., Kilpatrick, P., Torquati, M.: Fastflow: high-level and efficient streaming on multi-core. In: Pllana, S., Xhafa, F. (eds.) Programming Multi-core and Many-Core Computing Systems, Parallel and Distributed Computing, Chapter 13. Wiley, New York (2017). https://doi.org/10.1002/9781119332015.ch13
Allen, J.: Effective Akka: Patterns and Best Practices. O’Reilly Media, Inc., Sebastopol (2013)
Armstrong, J.: The development of Erlang. SIGPLAN Not. 32(8), 196–203 (1997). https://doi.org/10.1145/258949.258967
Barghi, S., Karsten, M.: Work-stealing, locality-aware actor scheduling. In: 2018 IEEE International Parallel and Distributed Processing Symposium (IPDPS), pp. 484–494 (2018). https://doi.org/10.1109/IPDPS.2018.00058
Bernstein, P., Bykov, S., Geller, A., Kliot, G., Thelin, J.: Orleans: distributed virtual actors for programmability and scalability. Microsoft Research. Available https://www.microsoft.com/en-us/research/publication/orleans-distributed-virtual-actors-for-programmability-and-scalability/ (2014)
Bienia, C., Kumar, S., Singh, J.P., Li, K.: The parsec benchmark suite: characterization and architectural implications. In: 17th International Conference on Parallel Architectures and Compilation Techniques, PACT ’08, pp. 72–81. ACM (2008). https://doi.org/10.1145/1454115.1454128
Black, F., Scholes, M.: The pricing of options and corporate liabilities. J. Polit. Econ. 81(3), 637–54 (1973)
Bozó, I., Fordós, V., Horvath, Z., Tóth, M., Horpácsi, D., Kozsik, T., Köszegi, J., Barwell, A., Brown, C., Hammond, K.: Discovering parallel pattern candidates in Erlang. In: Proceedings of the 13th ACM SIGPLAN Workshop on Erlang, Erlang ’14, pp. 13–23. ACM (2014). https://doi.org/10.1145/2633448.2633453
Campbell, C., Miller, A.: A Parallel Programming with Microsoft Visual C++: Design Patterns for Decomposition and Coordination on Multicore Architectures, 1st edn. Microsoft Press, Redmond (2011)
Charousset, D., Hiesgen, R., Schmidt, T.C.: Revisiting actor programming in C++. Comput. Lang. Syst. Struct. 45(Supplement C), 105–131 (2016)
Charousset, D., Schmidt, T.C., Hiesgen, R., Wählisch, M.: Native actors—a scalable software platform for distributed, heterogeneous environments. In: Proceedings of the 4rd ACM SIGPLAN Conference on Systems, Programming, and Applications (SPLASH ’13), Workshop AGERE!, pp. 87–96. ACM (2013)
Chasapis, D., Casas, M., Moretó, M., Vidal, R., Ayguadé, E., Labarta, J., Valero, M.: PARSECSs: evaluating the impact of task parallelism in the parsec benchmark suite. ACM Trans. Archit. Code Optim. 12(4), 41:1–41:22 (2015). https://doi.org/10.1145/2829952
Cole, M.: Bringing skeletons out of the closet: a pragmatic manifesto for skeletal parallel programming. Parallel Comput. 30(3), 389–406 (2004)
De Koster, J., Van Cutsem, T., De Meuter, W.: 43 years of actors: a taxonomy of actor models and their key properties. In: Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control—AGERE 2016, pp. 31–40. ACM Press (2016). https://doi.org/10.1145/3001886.3001890
De Sensi, D., De Matteis, T., Torquati, M., Mencagli, G., Danelutto, M.: Bringing parallel patterns out of the corner: the \(\text{ p }^{3}\)arsec benchmark suite. ACM Trans. Archit. Code Optim. 14(4), 33:1–33:26 (2017). https://doi.org/10.1145/3132710
Ernstsson, A., Li, L., Kessler, C.: Skepu 2: flexible and type-safe skeleton programming for heterogeneous parallel systems. Int. J. Parallel Program. 46(1), 62–80 (2018). https://doi.org/10.1007/s10766-017-0490-5
Fernandez-Reyes, K., Clarke, D., McCain, D.S.: Part: an asynchronous parallel abstraction for speculative pipeline computations. In: Nielson, H.R., Tuosto, E. (eds.) Coordination Models and Languages, pp. 101–120. Springer, Berlin (2016)
Francesquini, E., Goldman, A., Méhaut, J.F.: Improving the performance of actor model runtime environments on multicore and manycore platforms. In: Proceedings of the 2013 Workshop on Programming Based on Actors, Agents, and Decentralized Control, AGERE! 2013, pp. 109–114. ACM (2013). https://doi.org/10.1145/2541329.2541342
Hains, G., Henrio, L., Leca, P., Suijlen, W.: Active objects for coordinating BSP computations (short paper). In: Di Marzo Serugendo, G., Loreti, M. (eds.) Coordination Models and Languages, pp. 220–230. Springer, Berlin (2018)
Hayduk, Y., Sobe, A., Felber, P.: Dynamic message processing and transactional memory in the actor model. In: IFIP International Conference on Distributed Applications and Interoperable Systems, pp. 94–107. Springer (2015)
Henrio, L., Huet, F., István, Z.: Multi-threaded active objects. In: De Nicola, R., Julien, C. (eds.) Coordination Models and Languages, pp. 90–104. Springer, Berlin (2013)
Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: Proceedings of the 3rd International Joint Conference on Artificial Intelligence, IJCAI’73, pp. 235–245. Morgan Kaufmann Publishers Inc. (1973)
Hiesgen, R., Charousset, D., Schmidt, T.C.: OpenCL Actors - Adding Data Parallelism to Actor-Based Programming with CAF, pp. 59–93. Springer, Berlin (2018). https://doi.org/10.1007/978-3-030-00302-9_3
Imam, S.M., Sarkar, V.: Savina—an actor benchmark suite: enabling empirical evaluation of actor libraries. In: Proceedings of the 4th International Workshop on Programming based on Actors Agents & Decentralized Control—AGERE! ’14, pp. 67–80. ACM Press (2014). https://doi.org/10.1145/2687357.2687368
Koster, J.D., Marr, S., Cutsem, T.V., D’Hondt, T.: Domains: sharing state in the communicating event-loop actor model. Comput. Lang. Syst. Struct. 45, 132–160 (2016). https://doi.org/10.1016/j.cl.2016.01.003
Lavender, R.G., Schmidt, D.C.: Active object: an object behavioral pattern for concurrent programming. In: Vlissidis, J.M., Coplien, J.O., Kerth, N.L. (eds.) Pattern Languages of Program Design 2, pp. 483–499. Addison-Wesley Longman Publishing Co., Inc., Reading (1996)
Lv, Q., Josephson, W., Wang, Z., Charikar, M., Li, K.: Ferret: a toolkit for content-based similarity search of feature-rich data. SIGOPS Oper. Syst. Rev. 40(4), 317–330 (2006)
Mattson, T., Sanders, B., Massingill, B.: Patterns for Parallel Programming, 1st edn. Addison-Wesley Professional, Reading (2004)
Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Inc., Newton (2007)
Rinaldi, L., Torquati, M., Mencagli, G., Danelutto, M., Menga, T.: Accelerating actor-based applications with parallel patterns. In: 27th Euromicro PDP Conference, pp. 140–147. Pavia, Italy (2019). https://doi.org/10.1109/EMPDP.2019.8671602
Scholliers, C., Tanter, É., De Meuter, W.: Parallel actor monitors: disentangling task-level parallelism from data partitioning in the actor model. Sci. Comput. Program. 80, 52–64 (2014). https://doi.org/10.1016/j.scico.2013.03.011
Torquati, M., Menga, T., De Matteis, T., De Sensi, D., Mencagli, G.: Reducing message latency and CPU utilization in the CAF actor framework. In: 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing, PDP 2018, March 21-23, 2018, pp. 145–153. Cambridge, UK (2018). https://doi.org/10.1109/PDP2018.2018.00028
Trinder, P., Chechina, N., Papaspyrou, N., Sagonas, K., Thompson, S., Adams, S., Aronis, S., Baker, R., Bihari, E., Boudeville, O., Cesarini, F., Stefano, M.D., Eriksson, S., fördős, V., Ghaffari, A., Giantsios, A., Green, R., Hoch, C., Klaftenegger, D., Li, H., Lundin, K., Mackenzie, K., Roukounaki, K., Tsiouris, Y., Winblad, K.: Scaling reliably: improving the scalability of the Erlang distributed actor platform. ACM Trans. Program. Lang. Syst. 39(4), 17:1–17:46 (2017). https://doi.org/10.1145/3107937
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work has been partially supported by University of Pisa PRA 2018 66 DECLware: Declarative methodologies for designing and deploying applications.
Rights and permissions
About this article
Cite this article
Rinaldi, L., Torquati, M., De Sensi, D. et al. Improving the Performance of Actors on Multi-cores with Parallel Patterns. Int J Parallel Prog 48, 692–712 (2020). https://doi.org/10.1007/s10766-020-00663-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10766-020-00663-1