Understanding the Behavior of Transactional Memory Applications

'
! %&
!
! ! Individual Transaction Percentages
Code 2 10%
Code 0 45%
Code 1 45%
Code 0
Code 1
Code 2
Transaction Retry Rate
17
17
16
average of number of retries
15
14
13
12
11
10
9
8
7
6.776
6
5
4
3
3
3
2
1
0.324
0 233
#
#
!
+ *
+ !*
+ *
+ *
!
! "
""
" ! !
!
!
!#
+ %!
+ %*
""
""
)(*
Red-Black 1000 nodes
6000
250
5000
200
!
150
100
50
1000x Operations/second
1000x Operations/second
List 1000 nodes
300
4000
3000
2000
1000
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
1
2
4
Number of threads
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
8
1
4
8
Number of threads
Red-Black / RDTSC Counter / 1000 nodes
List / RDTSC Counter / 1000 nodes
2500
100
$
!
80
60
40
20
1000x Operations/second
120
1000x Operations/second
2
2000
1500
1000
500
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
1
2
4
Number of threads
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
1
8
2
4
8
Number of threads
List / Atomic Counter / 1000 nodes
Red-Black / Atomic Counter / 1000 nodes
25
350
&#!
15
10
5
1
2
4
Number of threads
250
200
150
100
50
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
1000x Operations/second
1000x Operations/second
300
20
5% insert, 5% remove, 90% lookup
45% insert, 45% remove, 10% lookup
0
8
1
2
4
Number of threads
8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
"
""
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!! !!! !!# !! !! !!!"
!!!# !!"
!!# !"! !"! !" ! !"! !""# !""
!"
!"
!#"
!#!! !# !# !#! !# !#" !# !#! !#"# !##! " " " "# " # "#
"!!"
"" ""# "# "! "#! "!# ""
"
"
"
!
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
""
!"
"
"
"
""
"
"
"
"!
"
!
! "
"
"
"
"
"
" "
"
"!
" ""
!"
"
'
+
"
%
%
#$
#
$
"
%
%
#$
#
$
"
MemCells
40,000
37,500
35,000
32,500
27,500
25,000
22,500
Commits/Aborts by both the Threads
20,000
17,500
37.5
Transactions Wasted Work Percentages
15,000
35.0
32.5
12,500
Read/Write Transaction Rates
10,000
7,500
30.0
2,500
14.545
90
25.565
Useful 34%
0
0
10
20
30
40
50
60
70
8080
90
100
110
time
70
MemCells
60
number of commits
27.5
100
5,000
%
number of commits
30,000
25.0
22.5
20.0
17.5
15.0
12.5
10.0
50
7.5
Wasted 66%
40
85.455
74.435
100
5.0
2.5
30
0.0
0.0
20
0
5.0
7.5
10.0
12.5
15.0
17.5
20.0
22.5
25.0
time
10
Wasted
2.5
Commits Thread1
Useful
Code 0
Code 1
Individual
al Tra
Transactions
Read
Write
W
Wr
r
ri
Code 2
Commits Thread2
Aborts Thread1
Aborts Thread2
27.5
30.0
Transaction Retry Rate
Transaction Retry Rate
84
17
)2)
.,3).,3)1,3)
0,
80
75
average of number of retries
70
65
60
55
50
45
40
35
30
25
21
20
15
14
13
12
11
10
9
8
7
5
4
3
10
2
6
3.897
0.528
0
Code 0
3
1
0.222
Code 1
6.776
6
15
5
)2)
.,3).,3)1,3)
-,,,,
16
average of number of retries
85
17
0.324
Code 0
Code 1
Average
13
9
9
8
7
6
5
4
3
3
2
1
2
)2)
/03)/03)-,3)
-,,,,
1.75
average of number of retries
average of number of retries
10
2
2.00
)2)
/03)/03)-,3)
0,
11
Max
Transaction Retry Rate
Transaction Retry Rate
12
Code 2
Individual
duall T
Transact
Transactions
Max
13
0.233
0
Code 2
Individual
duall T
Transact
Transactions
Average
3
1.50
1.25
1
1.00
0.75
0.50
0.25
0.589
0.52
0.146
0.00
0
Code 0
Code 1
Individual
iduall T
Transac
Transactions
Average
Max
Code 2
0.006
0.006
Code 0
0.002
Code 1
Individual
idua
uall T
Tran
Transactions
rans
s ac
Average
Max
Code 2
!
#
!
!
!
!
"