1 / 28

Boosting STM Replication via Speculation

Boosting STM Replication via Speculation. Roberto Palmieri, Paolo Romano, Francesco Quaglia, Luis Rodrigues. Replication. Is a typical way to achieve Fault Tolerance Several techniques: Primary Backup a pproach Active Replication approach …. Why Active Replication. APPROVED.

sorena
Download Presentation

Boosting STM Replication via Speculation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Boosting STM Replication via Speculation Roberto Palmieri, Paolo Romano, Francesco Quaglia, Luis Rodrigues

  2. Replication • Is a typical way to achieve Fault Tolerance • Several techniques: • Primary Backup approach • Active Replication approach • … Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  3. Why Active Replication APPROVED • Each replica keeps all data and executes the same transactions in the same order • PRO (+) • Full failure masking • No coordination for processing read-only transactions • Prone to target performance issues • CONS (-) • Agreement on common execution order • Deterministic business logic Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  4. Literature solutions for actively replicated transactional systems Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  5. State Machine Approach (SM) Coordination phase Processing m to-broadcast (m) to-delivery (m) • Implements Active Replication paradigm • Based on Atomic Broadcast as GCS • Does not exploit any kind of optimism • Requires deterministic Local CC Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  6. Optimistic Approach (OPT) Optimistic processing of m if(m is non-conflicting transaction) Commit(m) Processing m if(opt-delivery order == to-delivery order) Commit(m) Coordination phase if(opt-delivery order <> to-delivery order) Abort & Restart(m) to-delivery (m) to-broadcast (m) opt-delivery (m) • Based on Optimistic Atomic Broadcast as GCS • It processes in optimistic manner: • At most one conflicting transaction • Any non-conflicting transactions Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  7. Critiques to OPT (1) Unapproved for multicores A-priori knowledge on transaction read/write sets (to detect conflicts) might be infeasible (non-determinism) Unpredictability of transactions data access pattern imposes safe (over-) estimation of accessed data sets (reduced concurrency) Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  8. Critiques to OPT (2) Unapproved for STM Limited overlapping in case of fine-grain transactions Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  9. Critiques to OPT (3) Unapproved for generic networks • Ineffective if deployed on less or unpredictable networks • Networks without spontaneous ordering of optimistic deliveries Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  10. Unbalancing Ratio Modern (STM) Scenarios Traditional Scenarios ≈ 2 msec ≈ 2 msec Coordination delay ≈ 1/10msec ≈ 10/100 μsec Local Transaction Execution Time Long stall periods -> Resources underutilization Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  11. Target: Maximize the overlap • Coordination delay Vs Local transaction processing • Local transaction processing VsLocal transaction processing …… Opt-delivery (m3) Opt-delivery (m2) Multiple or same Serialization Orders Opt-delivery (m1) Coordination phase m1 to-delivery (m1) to-broadcast (m1) Coordination phase m2 to-delivery (m2) to-broadcast (m2) Coordination phase m3 to-delivery (m3) to-broadcast (m3) …… Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  12. How: Speculative Processing opt-del(TA) to-del(TA) opt-del(TB) to-del(TB) time abort(T’A) abort(TB)commit(TA) exec TATA->TB exec T’ATB->TA TA: exec TBTB->TA exec T’BTA->TB commit(T’B) TB: • Basic ideas: • Activate all transactions as soon as they are optimistic delivered • Explore (in depth and/or in breadth) multiple serialization orders Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  13. Speculative Processing:desirable properties • Correctness • The history of committed transaction generated is 1-copy serializable • Non-Redundancy • No two speculative instances of the same transaction observe the same snapshot • Completeness • Eventually, every permutation of optimistic delivered transactions (not yet finaldelivered) that produces a distinct snapshot is explored Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  14. Relaxing completeness completeness min. max. ✗ Completeness ✔ Completeness ✗ Completeness AGGRO STR OSARE [SPAA2010] [ISPA2010] [NCA 2011] [SRDS 2011] some “opportunistic”speculative orders at-most onespeculative order every distinct speculative order Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon The relevance of the completeness property depends on the likelihood of mismatches between final and optimistic delivery orders

  15. Aggressively Optimistic Transaction Processing (AGGRO) Tailored for networks with spontaneous order Lock based concurrency control Optimized lock semantic to reduce the lock wait time of conflicting transactions No a priori knowledge on transactions read/write sets No sibling transactions (reduced overhead) Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  16. AGGRO: key ideas OPT Ti → Tj • Uncommitted data item versions are aggressively made visible to other transactions (upon transaction completion) independently of whether the creating transactions will be eventually committed • Speculative transactions guided to follow the Optimistic delivery order The ordering relations based on Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  17. Data item version states • Each version of shared objects in the transactional memory could be: • Committed • Uncommitted • Committed • The creator transaction has already committed • Uncommitted • Work-In-Progress (WIP) state, the creator transaction has not reached the complete stage yet • Complete, the creator transaction has reached the complete stage, but is not finalized as committed or aborted yet Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  18. Transactions’ ordering OPT Ti → Tj • Two transaction lists: • Opt-Delivered transactions (ODL) • TO (final)-Delivered transactions(FDL) • Transaction Ti → Tj if • Ti and Tjare both currently recorded within ODL, with Ti ordered before Tj • Ti is currently recorded within FDL, while Tj is currently recorded within ODL • Ti and Tj are both currently recorded within FDL, with Ti ordered before Tj Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  19. Algorithm sketch: Read Read dataitem X by Ti Get version V according to V is marked as WiP Yes Wait until the mark is removed No Read V and update the read-form set of Ti OPT → Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  20. Algorithm sketch: Write Write on dataitem X by Ti The dataitem X is marked as WiP Abort (and restart) all transactions that follow Ti (according to ) and read X from a different transaction OPT → Early abort mechanism Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  21. Algorithm sketch: Complete Ti completes its execution Remove all the WiP marks Make available written dataitems to other speculative transactions Permits to activate next conflicting transactions Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  22. Trace-based Simulator • A discrete event simulator based on JavaSim framework • Realistic timing and data access patterns (coming from execution of JVSTM) • (Optimistic) Atomic Broadcast service entails the possibility of batching messages to improve performance • Atomic Broadcast average delays: • Optimistic delivery: 500 μsec • Final (total ordered) delivery: 2 msec • LAN environment with no mismatch between optimistic and final deliveries (spontaneous order) Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  23. Test bed • Benchmarks: Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  24. Simulation results no speculation speculation 10x speedup Baseline (OPT) Vs AGGRO Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  25. CPU Utilization Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  26. Simulation results no speculation speculation Baseline (OPT) Vs AGGRO Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  27. CPU Utilization Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

  28. Thank you for the attention Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

More Related