04.01.2014 Views

VIP Scheduler - INESC-ID

VIP Scheduler - INESC-ID

VIP Scheduler - INESC-ID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fine-grained transaction scheduling<br />

Hugo Rito and João Cachopo<br />

WTM 2013<br />

<strong>INESC</strong>-<strong>ID</strong> Lisboa<br />

April 14th, 2013<br />

1


Atention<br />

DISCLAIMER<br />

This is still a work in progress<br />

The information contained in this<br />

presentation is subject to change and<br />

may not represent the final product<br />

2


Introduction<br />

Previously on...<br />

S TM<br />

SS TM<br />

ATOM<br />

S TM<br />

3


Introduction<br />

Software Transactional Memory<br />

S TM<br />

4


Introduction<br />

STMBench7: 10% Writes + Small transactions<br />

25<br />

Speedup (No-STM single-thread)<br />

20<br />

15<br />

10<br />

5<br />

JVSTM<br />

0<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

5


Introduction<br />

STMBench7: 10% Writes + Long transactions<br />

2.5<br />

Speedup (No-STM single-thread)<br />

2<br />

1.5<br />

1<br />

0.5<br />

JVSTM<br />

0<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

6


Introduction<br />

Green STM<br />

S TM =<br />

S TM +<br />

7


Introduction<br />

FlashbackSTM<br />

S TM<br />

SS TM<br />

ATOM<br />

S TM<br />

8


Introduction<br />

STMBench7: Read-dominated + Long transactions<br />

2.5<br />

Speedup (No-STM single-thread)<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

JVSTM<br />

FlashbackSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

9


Introduction<br />

STMBench7: Read-dominated + Long transactions<br />

Restart rate (%)<br />

90<br />

80<br />

70<br />

60<br />

50<br />

40<br />

30<br />

20<br />

10<br />

0<br />

FlashbackSTM<br />

JVSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

9


S TM<br />

Transaction Scheduling<br />

And now the<br />

continuation...<br />

S TM<br />

ATOM<br />

S TM<br />

Scheduling<br />

10


Transaction Scheduling<br />

Scheduling<br />

Reduce Conflicts<br />

Monitor contention<br />

Serialize transactions<br />

11


Transaction Scheduling<br />

Scheduling<br />

No <strong>Scheduler</strong><br />

11


Transaction Scheduling<br />

Scheduling<br />

No <strong>Scheduler</strong><br />

Serializing <strong>Scheduler</strong><br />

11


Transaction Scheduling<br />

Related work<br />

CAR<br />

Optimistic<br />

Pessimistic<br />

ATS<br />

Shrink<br />

No Conflicters<br />

12


Transaction Scheduling<br />

FlashbackSTM<br />

FlashbackSTM<br />

JVSTM + Memo<br />

RO never conflict<br />

RW conflicts vs. already committed<br />

Early aborts<br />

13


Transaction Scheduling<br />

FlashbackSTM + Scheduling<br />

2.5<br />

Speedup (No-STM single-thread)<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

Shrink + FbSTM<br />

CAR + FbSTM<br />

No_Conflicters + FbSTM<br />

ATS + FbSTM<br />

FbSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

13


Transaction Scheduling<br />

FlashbackSTM + Scheduling<br />

Over serialization<br />

Serialize non-conflicting transactions<br />

Hinders parallelism<br />

13


Transaction Scheduling<br />

FlashbackSTM + Scheduling<br />

No <strong>Scheduler</strong><br />

Serializing <strong>Scheduler</strong><br />

13


Transaction Scheduling<br />

FlashbackSTM + Scheduling<br />

CAR<br />

Optimistic<br />

?<br />

Pessimistic<br />

ATS<br />

Shrink<br />

No Conflicters<br />

13


Proposal<br />

<strong>VIP</strong> scheduler<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

Optimistic (more)<br />

Fine-grained<br />

<strong>VIP</strong> transactions<br />

14


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E<br />

E<br />

E X P E E<br />

<strong>VIP</strong>s<br />

15


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E<br />

E<br />

E X P E E<br />

<strong>VIP</strong>s<br />

E X<br />

P<br />

15


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E<br />

E<br />

E X P E E<br />

<strong>VIP</strong>s<br />

E X<br />

P<br />

15


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E E X X<br />

E X P E E E X P<br />

<strong>VIP</strong>s<br />

E X<br />

P<br />

15


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E E X X<br />

E X P E E E X P E E<br />

<strong>VIP</strong>s<br />

15


Proposal<br />

<strong>VIP</strong> execution<br />

<strong>VIP</strong> <strong>Scheduler</strong><br />

E E X X<br />

E X P E E E X P E E<br />

V I P P R S<br />

<strong>VIP</strong>s<br />

15


Experimental Results<br />

STMBench7: 10% Writes + Long transactions<br />

Speedup (No-STM single-thread)<br />

4<br />

3.5<br />

3<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

<strong>VIP</strong> + FbSTM<br />

Shrink + FbSTM<br />

CAR + FbSTM<br />

No_Conflicters + FbSTM<br />

ATS + FbSTM<br />

FbSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

16


Experimental Results<br />

STMBench7: 40% Writes + Long transactions<br />

Speedup (No-STM single-thread)<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

<strong>VIP</strong> + FbSTM<br />

Shrink + FbSTM<br />

CAR + FbSTM<br />

No_Conflicters + FbSTM<br />

ATS + FbSTM<br />

FbSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

17


Experimental Results<br />

STMBench7: 90% Writes + Long transactions<br />

Speedup (No-STM single-thread)<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

<strong>VIP</strong> + FbSTM<br />

Shrink + FbSTM<br />

CAR + FbSTM<br />

No_Conflicters + FbSTM<br />

ATS + FbSTM<br />

FbSTM<br />

1 4 8 12 16 20 24 28 32 36 40 44 48<br />

# Threads<br />

18


Future work<br />

Challenges: Thread inactivity<br />

Execution vs. Wait time<br />

57 43<br />

19


Future work<br />

Challenges: Early aborts + Expected read-set<br />

E X<br />

P<br />

20


Future work<br />

Challenges: Early aborts + Expected read-set<br />

E X<br />

P<br />

E C<br />

20


Future work<br />

Challenges: Early aborts + Expected read-set<br />

E X<br />

P<br />

E C<br />

T E D<br />

20


Future work<br />

Challenges: Set intersection<br />

Read-set<br />

?<br />

Write-set<br />

21


Q&A<br />

Thank you,<br />

Q U<br />

E<br />

S T I O N<br />

S<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!