Presentation is loading. Please wait.

Presentation is loading. Please wait.

Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon Boosting STM Replication via Speculation Roberto Palmieri,

Similar presentations


Presentation on theme: "Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon Boosting STM Replication via Speculation Roberto Palmieri,"— Presentation transcript:

1 Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon 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 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) Implements Active Replication paradigm Based on Atomic Broadcast as GCS Does not exploit any kind of optimism Requires deterministic Local CC Coordination phase to-broadcast (m)to-delivery (m) Processing m Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

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

7 Critiques to OPT (1) 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) 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) 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 Coordination delay Local Transaction Execution Time Traditional Scenarios Modern (STM) Scenarios ≈ 2 msec ≈ 1/10 msec ≈ 2 msec ≈ 10/100 μsec Long stall periods -> Resources underutilization Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

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

12 How: Speculative Processing Basic ideas: – Activate all transactions as soon as they are optimistic delivered – Explore (in depth and/or in breadth) multiple serialization orders time commit(T’ B ) TB:TB: TA:TA: opt-del(T B ) opt-del(T A ) to-del(T A ) to-del(T B ) exec T B T B -> T A exec T A T A -> T B exec T’ A T B -> T A exec T’ B T A -> T B abort(T’ A ) abort(T B ) commit(T A ) abort(T’ A ) abort(T B ) commit(T A ) 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 final delivered) that produces a distinct snapshot is explored Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

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

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 1.Uncommitted data item versions are aggressively made visible to other transactions (upon transaction completion) independently of whether the creating transactions will be eventually committed 2.Speculative transactions guided to follow the Optimistic delivery order The ordering relations based on T i → T j OPT 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 Two transaction lists: – Opt-Delivered transactions (ODL) – TO (final)-Delivered transactions (FDL) Transaction T i → T j if – T i and T j are both currently recorded within ODL, with T i ordered before T j – T i is currently recorded within FDL, while T j is currently recorded within ODL – T i and T j are both currently recorded within FDL, with T i ordered before T j Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon T i → T j OPT

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

20 Algorithm sketch: Write Write on dataitem X by T i The dataitem X is marked as WiP Abort (and restart) all transactions that follow T i (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 T i 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: NameTypeMean Transaction Execution Time RB-TreeMicro Benchmark77 μsec SkipListMicro Benchmark281 μsec ListMicro Benchmark324 μsec Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon

24 Simulation results Baseline (OPT) Vs AGGRO no speculationspeculation 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 Baseline (OPT) Vs AGGRO no speculationspeculation 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


Download ppt "Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon Boosting STM Replication via Speculation Roberto Palmieri,"

Similar presentations


Ads by Google