speculative concurrent processing with transactional
play

Speculative Concurrent Processing with Transactional Memory in the - PowerPoint PPT Presentation

Speculative Concurrent Processing with Transactional Memory in the Actor Model OPODIS 2013 Yaroslav Hayduk, Anita Sobe, Derin Harmanci, Patrick December 17, 2013 Marlier and Pascal Felber University of Neuchatel,


  1. Speculative Concurrent Processing with Transactional Memory in the Actor Model OPODIS ¡2013 ¡ ¡ Yaroslav Hayduk, Anita Sobe, Derin Harmanci, Patrick December ¡17, ¡2013 ¡ Marlier and Pascal Felber University of Neuchatel, Switzerland This project and the research leading to these results has received funding from the European Community's Seventh Framework Programme [FP7/2007-2013] under grant agreement n° 318693

  2. A bit of background: The Actor Model • Hewitt & Baker (IFIP Congress’77) – „Laws for Communicating Parallel Processes“ Motivated by the prospect of highly parallel computing machines with many microprocessors + own local memory OPODIS 2013, Yaroslav Hayduk 2

  3. OOP and actors: Communication • Everything is an actor (VS an object) • Asynchronous message passing • Has access to its local state only • Strong encapsulation • Inherently concurrent OPODIS 2013, Yaroslav Hayduk 3

  4. OOP and actors: Communication ObjectB. publicMethod() ¡ ObjectB. publicField=10 ¡ Object ¡A ¡ Object ¡B ¡ direct ¡access ¡ Illegal: ¡ strong ¡ VS ¡ encapsulaCon ¡ ActorB.publicField ¡= ¡10 ¡ ¡ ¡ ActorA ¡ [SendMessageTo] ¡ActorB ¡ Object ¡A ¡ Object ¡A ¡ asynchronous ¡message ¡passing ¡ OPODIS 2013, Yaroslav Hayduk 4

  5. Problem statement Sequential processing of messages limits � performance & throughput Multiple actors participating in the same � coordinated transaction block, causing message processing delays OPODIS 2013, Yaroslav Hayduk 5

  6. Main contributions A method for processing many messages � concurrently using STM, and A method for removing excessive � blocking, associated with the processing of coordinated transactions ⇒ both methods preserve the semantics of the Actor Model OPODIS 2013, Yaroslav Hayduk 6

  7. A current solution Habanero Scala - Shams et al. (Scala � Days’12) – Habanero Scala ⇒ async-finish programming model Main strength: processes parts of one � message concurrently OPODIS 2013, Yaroslav Hayduk 7

  8. Case 1: Concurrent message processing B ¡ Actor ¡C ¡(“List” ¡Actor) ¡ Contains ¡2 ¡ Local ¡Actor ¡state ¡ 2 5 6 8 9 In ¡progress: ¡ Contains ¡8 ¡ Remove ¡9 ¡ A ¡ Mailbox ¡ BoKlenecks? ¡ … ¡ Insert ¡3 ¡ Contains ¡2 ¡ OPODIS 2013, Yaroslav Hayduk 8

  9. Concurrent message processing Possible issues? � List corruption � ⇒ wrap message processing in an STM transaction. Altered message ordering � ⇒ messages are not guaranteed to arrive in order because they are sent asynchronously OPODIS 2013, Yaroslav Hayduk 9

  10. Case 2: Coordinated message processing A ¡List ¡Range ¡(1..25) ¡ A ¡List ¡Range ¡(100..125) ¡ ¡ ¡ Actor ¡ Actor ¡ ………. ¡ Global ¡list ¡sum ¡ A ¡ OPODIS 2013, Yaroslav Hayduk 10

  11. Global list sum – actor operations magnified A ¡List ¡Range ¡Actor ¡ ¡ Local ¡Actor ¡state ¡ New ¡par>al ¡sum ¡ Prev ¡par>al ¡sum ¡ ¡ 2 5 6 8 9 ¡ ¡ ¡ 1. Calculate ¡local ¡sum ¡ 2. Forward ¡new ¡par>al ¡sum ¡ 3. Block ¡(for ¡consistency) ¡ BoKlenecks? ¡ OPODIS 2013, Yaroslav Hayduk 11

  12. Case 2: Our solution Remove blocking; process other � messages speculatively ⇒ pre-commit the local coordinated transaction ⇒ process other messages in a transaction speculatively OPODIS 2013, Yaroslav Hayduk 12

  13. Our solution illustrated A ¡List ¡Range ¡Actor ¡ ¡ Local ¡Actor ¡state ¡ ¡ 2 5 6 8 9 ¡ ¡ ¡ Specula+vely ¡process: ¡ Actor ¡Mailbox ¡ Messages ¡ ¡ Contains ¡3 ¡ … ¡ In ¡progress ¡ sum ¡ Contains ¡2 ¡ Saved: ¡Par>ally ¡commiGed ¡ local ¡coordinated ¡transac>on ¡ OPODIS 2013, Yaroslav Hayduk 13

  14. Experimental settings • Software: a modified Akka 2.10 distribution & Scala 2.10 • Hardware: 48-core AMD Opteron 6172 CPUs running at 2.1GHz • Application: Stateful distributed sorted integer linked-list OPODIS 2013, Yaroslav Hayduk 14

  15. Results ExecuCon ¡Cme ¡for ¡sequenCal, ¡concurrent, ¡and ¡ non-­‑blocking: ¡ write-­‑dominated ¡workload ¡ OPODIS 2013, Yaroslav Hayduk 15

  16. Results ExecuCon ¡Cme ¡for ¡sequenCal, ¡concurrent, ¡and ¡ non-­‑blocking: ¡ read-­‑dominated ¡workload ¡ OPODIS 2013, Yaroslav Hayduk 16

  17. Results Combined ¡concurrent ¡& ¡non-­‑blocking ¡execuCon ¡ OPODIS 2013, Yaroslav Hayduk 17

  18. Results Comparing ¡with ¡Habanero ¡Scala ¡ Habanero ¡Scala ¡ OPODIS 2013, Yaroslav Hayduk 18

  19. Summary By using speculation, we can achieve a � higher message throughput in the Actor Model By using STM we guarantee that the � Actor’s state is never corrupted OPODIS 2013, Yaroslav Hayduk 19

  20. Questions? OPODIS 2013, Yaroslav Hayduk 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend