1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
| $ cassandra-stress write n=50000 no-warmup -rate threads=1
******************** Stress Settings ********************
Command:
Type: write
Count: 50,000
No Warmup: true
Consistency Level: LOCAL_ONE
Target Uncertainty: not applicable
Key Size (bytes): 10
Counter Increment Distibution: add=fixed(1)
Rate:
Auto: false
Thread Count: 1
OpsPer Sec: 0
Population:
Sequence: 1..50000
Order: ARBITRARY
Wrap: true
Insert:
Revisits: Uniform: min=1,max=1000000
Visits: Fixed: key=1
Row Population Ratio: Ratio: divisor=1.000000;delegate=Fixed: key=1
Batch Type: not batching
Columns:
Max Columns Per Key: 5
Column Names: [C0, C1, C2, C3, C4]
Comparator: AsciiType
Timestamp: null
Variable Column Count: false
Slice: false
Size Distribution: Fixed: key=34
Count Distribution: Fixed: key=5
Errors:
Ignore: false
Tries: 10
Log:
No Summary: false
No Settings: false
File: null
Interval Millis: 1000
Level: NORMAL
Mode:
API: JAVA_DRIVER_NATIVE
Connection Style: CQL_PREPARED
CQL Version: CQL3
Protocol Version: V5
Username: null
Password: null
Auth Provide Class: null
Max Pending Per Connection: 128
Connections Per Host: 8
Compression: NONE
Node:
Nodes: [localhost]
Is White List: false
Datacenter: null
Schema:
Keyspace: keyspace1
Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
Replication Strategy Options: {replication_factor=1}
Table Compression: null
Table Compaction Strategy: null
Table Compaction Strategy Options: {}
Transport:
truststore=null; truststore-password=null; keystore=null; keystore-password=null; ssl-protocol=TLS; ssl-alg=null; ssl-ciphers=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA;
Port:
Native Port: 9042
JMX Port: 7199
Graph:
File: null
Revision: unknown
Title: null
Operation: WRITE
TokenRange:
Wrap: false
Split Factor: 1
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: datacenter1; Host: localhost/127.0.0.1:9042; Rack: rack1
Created keyspaces. Sleeping 1s for propagation.
Sleeping 2s...
Running WRITE with 1 threads for 50000 iteration
type total ops, op/s, pk/s, row/s, mean, med, .95, .99, .999, max, time, stderr, errors, gc: #, max ms, sum ms, sdv ms, mb
WARN 12:14:41,099 Query 'com.datastax.driver.core.Statement$1@66c9a6b2;' generated server side warning(s): `USE <keyspace>` with prepared statements is considered to be an anti-pattern due to ambiguity in non-qualified table names. Please consider removing instances of `Session#setKeyspace(<keyspace>)`, `Session#execute("USE <keyspace>")` and `cluster.newSession(<keyspace>)` from your code, and always use fully qualified table names (e.g. <keyspace>.<table>). Keyspace used: keyspace1, statement keyspace: keyspace1, statement id: e1d2f4aa887d02751110f92a52de4f20
total, 898, 898, 898, 898, 0.9, 0.6, 2.3, 4.2, 12.0, 13.1, 1.0, 0.00000, 0, 0, 0, 0, 0, 0
total, 3415, 2517, 2517, 2517, 0.4, 0.2, 0.8, 1.9, 11.1, 39.0, 2.0, 0.34246, 0, 0, 0, 0, 0, 0
total, 6486, 3071, 3071, 3071, 0.3, 0.2, 0.7, 1.7, 7.8, 13.4, 3.0, 0.24613, 0, 0, 0, 0, 0, 0
total, 11026, 4540, 4540, 4540, 0.2, 0.2, 0.4, 0.9, 2.7, 11.4, 4.0, 0.23408, 0, 0, 0, 0, 0, 0
total, 16655, 5629, 5629, 5629, 0.2, 0.1, 0.2, 0.4, 1.6, 11.3, 5.0, 0.21763, 0, 0, 0, 0, 0, 0
total, 23032, 6377, 6377, 6377, 0.1, 0.1, 0.2, 0.2, 1.0, 24.3, 6.0, 0.19918, 0, 0, 0, 0, 0, 0
total, 28923, 5891, 5891, 5891, 0.2, 0.1, 0.2, 0.2, 0.5, 48.1, 7.0, 0.17292, 0, 1, 45, 45, 0, 384
total, 35281, 6358, 6358, 6358, 0.1, 0.1, 0.2, 0.2, 1.3, 18.1, 8.0, 0.15331, 0, 0, 0, 0, 0, 0
total, 41381, 6100, 6100, 6100, 0.2, 0.1, 0.2, 0.2, 0.4, 11.1, 9.0, 0.13604, 0, 0, 0, 0, 0, 0
total, 47359, 5978, 5978, 5978, 0.2, 0.1, 0.2, 0.3, 0.4, 1.1, 10.0, 0.12182, 0, 0, 0, 0, 0, 0
total, 50000, 6388, 6388, 6388, 0.1, 0.1, 0.2, 0.2, 0.3, 0.8, 10.4, 0.11100, 0, 0, 0, 0, 0, 0
Results:
Op rate : 4,801 op/s [WRITE: 4,801 op/s]
Partition rate : 4,801 pk/s [WRITE: 4,801 pk/s]
Row rate : 4,801 row/s [WRITE: 4,801 row/s]
Latency mean : 0.2 ms [WRITE: 0.2 ms]
Latency median : 0.1 ms [WRITE: 0.1 ms]
Latency 95th percentile : 0.3 ms [WRITE: 0.3 ms]
Latency 99th percentile : 1.0 ms [WRITE: 1.0 ms]
Latency 99.9th percentile : 3.5 ms [WRITE: 3.5 ms]
Latency max : 48.1 ms [WRITE: 48.1 ms]
Total partitions : 50,000 [WRITE: 50,000]
Total errors : 0 [WRITE: 0]
Total GC count : 1
Total GC memory : 383.747 MiB
Total GC time : 0.0 seconds
Avg GC time : 45.0 ms
StdDev GC time : 0.0 ms
Total operation time : 00:00:10
END
$ nodetool flush
$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 12.04 MiB 16 100.0% 349d6a93-038a-45a9-bd86-cc22ed3d8e0d rack1
➜ ~ cqlsh
/opt/homebrew/Cellar/cassandra/4.1.2/libexec/bin/cqlsh.py:473: DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.
/opt/homebrew/Cellar/cassandra/4.1.2/libexec/bin/cqlsh.py:503: DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consitency level to the EXEC_PROFILE_DEFAULT profile.
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.1.0 | Cassandra 4.1.2 | CQL spec 3.4.6 | Native protocol v5]
Use HELP for help.
cqlsh> DESCRIBE KEYSPACES;
keyspace1 system_auth system_traces
killrvideo system_distributed system_views
system system_schema system_virtual_schema
cqlsh> USE keyspace1;
cqlsh:keyspace1> DESCRIBE TABLES;
counter1 standard1
cqlsh:keyspace1> SELECT *
... FROM standard1
... LIMIT 5;
key | C0 | C1 | C2 | C3 | C4
------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------+------------------------------------------------------------------------
0x35384d4d334f39355030 | 0x2b021ed2ca95d8d6d450774953900af7226f692a1951fbb58099d51b54b9975a0022 | 0x3411457464d3cd9c716cad05cfc4a8a9556db308ec450e80afac7cbb2ee7a2e1040f | 0xb0b01f5612908837eeaaab017ec6f2cc988989916c02038e813f2b2811e2e5ffde35 | 0x7e7e764b144db561aa6722b593fb872cb41126362eebeeb233ba0dd97b9c761807ab | 0xb601e0fbd8b342baaae29bd469a24c906d960d36e80c5ddf2253b91335453833eec0
0x314d324d31374b393431 | 0x1deda456d4ebf65ffe2cf623e8592d5621d9c83430add55fe2ac5cad67689ea54692 | 0x5f5b73a37e538de3bd766072e1032566bfa365c54d165745d8e81bb68fd6c1e0b70d | 0xa90f84cffb8601404d4be21c7d0f95da832b853852d112234803457ca87d59d96e4f | 0x612a8888062268cb811adbb591b4f9e7dceacad7c38c90af38d0e8501d76e26cab23 | 0xe50417a72c78b64e3ca433471b91b16651c25870fdc93b673552ce65da51480ddf6c
0x33344b50353133365030 | 0xd34820f1e930d9257e02158146c64ea6b052903710919294f196c174591318a00c1a | 0x6becf1098ae914e65c0325081a8a4418f9d65575a831db087102140b8b52db166ef0 | 0x34b89becc7ae1d391e814edc105e7f7e5efa495e2ad4850a753bc5236902f6380690 | 0x02e517fcc81da646fc7ba6f9f5dd88a4012e33e977d055a4ea50a7c25da9ba19f6ea | 0x5692948b8be2c35ed8af2e40135e26fddb7af2f425374cf835622e20a74cf3655e80
0x324d4f3031314c303330 | 0xc6d16d17a30611dc7646de3463be469dc56130a24345063854c356853a9966be1f01 | 0xbfdd8fd17ec738056feb9c176f64c5f0532b672dc398cd6d3470f05fc3aae437d990 | 0xc1cc57455dfa0cc0dd595accfa3751f6d5edac2e11b4e763ea88ca2b7f45ec77ab8d | 0x7998ea0ed12980933317b639d9b92ee20d0e6d66b1a531bd75c2c367aeeee47b73d4 | 0x9142cb1c0668c414c25eb264e52752f5e2cd86f3b15b3c5f5d8413f88fbcffbda7d2
0x30303138344f4e503530 | 0x37e76a8c71afc1adda7958aa1182c5c100f120d91ced0323f3cc5090319fda464bf3 | 0x1a3a594716dc09025772fcf56724177110faa26f24e66a38cae64be7a568a182b9c9 | 0xcae650315e85148d46c91c857bc8a87e767fdb6e0450bee503f556bc1999a1dfeab5 | 0x6b48adf2bc3f36e8a1adb1314f41f28f0fbb69d2551f0b0e650f6595097af61c99a1 | 0xf8f02decf64b8889cbd28a01080b368849f065889b5de4addd73dc78c4343872a5c0
(5 rows)
cqlsh:keyspace1>
|