cassandra performance benchmark
DESCRIPTION
The Economics of Scaling Cassandra - By Alex Bordei, Techie Product Manager at Bigstep This presentation was made during the "Cassandra Summit 2014" Event, in London. We benchmarked Cassandra on a number of configurations and we show what's the scaling profile. We test Cassandra on Docker as well as Cassandra's In-memory feature. Follow Alex on Twitter: @alexandrubordei Bigstep on Twitter: @BigStepInc If you have any questions, let us know at [email protected] and we'll do our best to answer. Stay informed: http://blog.bigstep.com/TRANSCRIPT
![Page 1: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/1.jpg)
![Page 2: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/2.jpg)
![Page 3: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/3.jpg)
![Page 4: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/4.jpg)
![Page 5: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/5.jpg)
![Page 6: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/6.jpg)
![Page 7: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/7.jpg)
![Page 8: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/8.jpg)
Benchmark setup
Centos 6.5, Datastax 4.5.3, jmeter with custom
sampler using the java driver
/dev/shm (100G), HP on, -XX:+UseLargePages,
Disabled THP, IRQBalance
![Page 9: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/9.jpg)
Scaling Horizontally - Latency
1918
1010
16
97
15
78
14
7
0
5
10
15
20
25
INSERT AVG response time (us) SELECT AVG response time (us) UPDATE AVG response time (us)
Ave
rage
response tim
e (
ms)
sm
alle
r is
bette
r
1 node 2 nodes 3 nodes 4 Nodes
![Page 10: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/10.jpg)
Scaling Horizontally - Throughput
90 96
168151
106
193202
120
252
223
130
249
0
65
130
195
260
325
INSERT throughput (k) SELECT throughput (k) UPDATE throughput (k)
KR
eq/s
ec -
Big
ger
is B
etter
1 node 2 nodes 3 nodes 4 Nodes
![Page 11: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/11.jpg)
52 53
70
9096
171
0
45
90
135
180
INSERT SELECT UPDATE
kR
eq/s
-big
ger
is b
ette
r
FMCI 4.32 FMCI 20.192
33
40
1919 18
10
0
10
20
30
40
50
INSERT SELECT UPDATE
Avera
ge
Re
spo
nse t
ime
(m
s)
Sm
alle
r is
Bette
r
FMCI 4.32 FMCI 20.192
Scaling Vertically
![Page 12: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/12.jpg)
Scaling Economics - Math
The score was computed by comparing:
Response times against the slowest
Number of requests/second against the fastest
![Page 13: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/13.jpg)
2.3
1.5
1.0
0.40.3
0.0
0.6
1.2
1.8
2.4
3.0
1 node -FMCI 4.32 1 node 2 nodes 3 nodes 4 Nodes
Price
-to
-pe
rform
ance
-ratio (
big
ge
r is
be
tte
r)
Datastax’s Scaling Economics
![Page 14: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/14.jpg)
• Amdhal’s Law
• Hardware prices
Why?
![Page 15: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/15.jpg)
Amdhal’s Law
![Page 16: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/16.jpg)
8,855 10,493
15,825 14,63817,304
22,249 23,963
3,918
10,493
20,986
26,505
35,107
53,010
70,215
0.
20000.
40000.
60000.
80000.
1x E3-1230v2
1x E5-2630v2
2x E5-2630v2
1x E5-2670v2
1x E5-2690v2
2x E5-2670v2
2x E5-2690v2
Pe
rfo
rma
nce
(h
igh
er
is b
ette
r)
Configuration
Performance relative to price
WHAT IT IS WHAT IT SHOULD BE
Specs PRICE ($) CPUMARK Est.
CPUMARK
1x E3-1230v2 4 cores,
3.3Ghz
$230.00 8855 3918
1x E5-2630v2 6 cores,
2.6Ghz
$616.00 10493 10493
2x E5-2630v2 2x6 cores,
2.6Ghz
$1232.00 15825 20986
1x E5-2670v2 8 cores,
2.6Ghz
$1556.00 14638 26505
1x E5-2690v2 10 cores,
3Ghz
$2061.00 17304 35107
2x E5-2670v2 2x8 cores,
2.6Ghz
$3112.00 22249 53010
2x E5-2690v2 2x10 cores,
3Ghz
$4122.00 23963 70215
CPU Prices
![Page 17: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/17.jpg)
Money spending efficiency
![Page 18: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/18.jpg)
0.000s
432000.000s
864000.000s
1296000.000s
1728000.000s
2160000.000s
2592000.000s
3024000.000s
sysbench memory 1TB read (1Mbs), write total time
Native Virtual
0.000s
86400.000s
172800.000s
259200.000s
345600.000s
432000.000s
518400.000s
sysbench multi-threadingperformance
Native Virtual
Virtualisation vs Native
![Page 19: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/19.jpg)
Source:VIRTUAL MEMORY SYSTEMS AND TLB STRUCTURES Univ. Maryland 2001
Virtual Memory
![Page 20: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/20.jpg)
Source:VIRTUAL MEMORY SYSTEMS AND TLB STRUCTURES Univ. Maryland 2001
Memory address translation with and without a TLB
Virtual Address Virtual Address
Physical Address Physical Address
![Page 21: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/21.jpg)
• TLB: Translation Lookaside Buffers
• Memory pointers in OS = address in virtual memory not real memory, need an offset to get to the real
memory. Offset needs to be calculated (and this is very expensive) so it is cached in TLB.
• TLB miss normally=150 cycles
• Hardware assisted virtualisation makes normal translation faster in VMs but introduces high penalty on
TLB miss.
TLB: Translation Lookaside Buffers
![Page 22: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/22.jpg)
TLB Misses
Source: “Memory System Characterization of Big Data Workloads” by Martin Dimitrov et al. - Intel Corp. [2013]
![Page 23: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/23.jpg)
Centos 6.5, Datastax 4.5.3, jmeterdocker run -m 16G -d --privileged=true
Docker setup
![Page 24: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/24.jpg)
19 18
10
2119
11
20
26
13
40
3028
0
10
20
30
40
50
INSERT SELECT UPDATE
Avera
ge R
esponse T
ime (
ms)
-S
malle
r Is
Better
1 Node native 1 Node Native 1 docker container 1 node native with 2 docker containers 1 native with 4 docker containers
Docker vs Native - Latency
![Page 25: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/25.jpg)
Docker vs Native - Throughput
9096
168
8292
149
7868
81
45
60 56
0
45
90
135
180
INSERT SELECT UPDATE
KR
eq/s
-big
ger
is b
etter
1 Node native 1 Node Native 1 docker container 1 node native with 2 docker containers 1 native with 4 docker containers
![Page 26: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/26.jpg)
![Page 27: Cassandra Performance Benchmark](https://reader033.vdocuments.us/reader033/viewer/2022051016/559960881a28ab44538b4728/html5/thumbnails/27.jpg)