Skip to main content
Log in

Improving the Performance of Actors on Multi-cores with Parallel Patterns

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Listing 1
Fig. 2
Listing 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. The implementations are available at https://github.com/ParaGroup/caf-pp.

  2. Application code available at https://github.com/ParaGroup/caf-pp.

  3. Application code available in the \(\hbox {P}^3\)ARSEC repository at https://github.com/ParaGroup/p3arsec.

References

  1. Agha, G.A.: Actors: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge (1986)

    Book  Google Scholar 

  2. 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)

    Article  MathSciNet  Google Scholar 

  3. 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

    Chapter  Google Scholar 

  4. Allen, J.: Effective Akka: Patterns and Best Practices. O’Reilly Media, Inc., Sebastopol (2013)

    Google Scholar 

  5. Armstrong, J.: The development of Erlang. SIGPLAN Not. 32(8), 196–203 (1997). https://doi.org/10.1145/258949.258967

    Article  MATH  Google Scholar 

  6. 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

  7. 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)

  8. 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

  9. Black, F., Scholes, M.: The pricing of options and corporate liabilities. J. Polit. Econ. 81(3), 637–54 (1973)

    Article  MathSciNet  Google Scholar 

  10. 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

  11. 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)

    Google Scholar 

  12. Charousset, D., Hiesgen, R., Schmidt, T.C.: Revisiting actor programming in C++. Comput. Lang. Syst. Struct. 45(Supplement C), 105–131 (2016)

    Google Scholar 

  13. 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)

  14. 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

    Article  Google Scholar 

  15. Cole, M.: Bringing skeletons out of the closet: a pragmatic manifesto for skeletal parallel programming. Parallel Comput. 30(3), 389–406 (2004)

    Article  Google Scholar 

  16. 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

  17. 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

    Article  Google Scholar 

  18. 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

    Article  Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. 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

  21. 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)

    Chapter  Google Scholar 

  22. 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)

  23. 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)

    Chapter  Google Scholar 

  24. 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)

  25. 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

    Book  Google Scholar 

  26. 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

  27. 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

    Article  Google Scholar 

  28. 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)

    Google Scholar 

  29. 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)

    Article  Google Scholar 

  30. Mattson, T., Sanders, B., Massingill, B.: Patterns for Parallel Programming, 1st edn. Addison-Wesley Professional, Reading (2004)

    MATH  Google Scholar 

  31. Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Inc., Newton (2007)

    Google Scholar 

  32. 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

  33. 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

    Article  MATH  Google Scholar 

  34. 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

  35. 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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Massimo Torquati.

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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10766-020-00663-1

Keywords

Navigation