Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit d4760a6

Browse files
Cody CrudgingtonCharandas Batra
authored andcommitted
final push, update of docs and experiment
1 parent 0c45a6a commit d4760a6

File tree

9 files changed

+49
-104
lines changed

9 files changed

+49
-104
lines changed

cassandra/Docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get --assume-yes install curl gnupg2 wget
1010
#RUN wget https://www.apache.org/dist/cassandra/KEYS && apt-key add KEYS
1111

1212
# Add Cassandra Repo 4.x
13-
RUN echo "deb http://downloads.apache.org/cassandra/debian 40x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list
13+
RUN echo "deb http://downloads.apache.org/cassandra/debian 311x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list
1414
RUN curl https://downloads.apache.org/cassandra/KEYS | apt-key add -
1515

1616
# Install Cassandra package

cassandra/Docker/entrypoint.sh

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
11
#!/bin/bash
2+
set -e
23

3-
cassandra-stress write n=1000000 -rate threads=100 -node cassandra &
4-
wait $!
5-
6-
#cassandra-stress read -node cassandra &
4+
#cassandra-stress write n=1000000 -rate threads=100 -node cassandra &
75
#wait $!
86

9-
cassandra-stress mixed n=100000 -rate threads=100 -node cassandra &
10-
wait $!
7+
#cassandra-stress mixed n=100000 -rate threads=100 -node cassandra &
8+
#wait
9+
10+
#cqlsh --request-timeout=60 -e "DROP KEYSPACE keyspace1;" cassandra || true
11+
#wait
12+
13+
>&1
14+
cqlsh --request-timeout=60 -e "DESCRIBE KEYSPACE keyspace1;" cassandra || true
1115

1216
cqlsh --request-timeout=60 -e "DROP KEYSPACE keyspace1;" cassandra || true
13-
wait
1417

15-
echo "Completed"
18+
cassandra-stress write n=100000 -rate threads=10 -node cassandra
19+
20+
cassandra-stress mixed n=100000 -rate threads=10 -node cassandra
21+
22+
#if [ $? -eq 0 ]
23+
#then
24+
# echo "Successfully completed ctress test"
25+
#else
26+
# echo "Could not finish stress test successfully" >&2
27+
#fi
28+
29+
#cqlsh --request-timeout=60 -e "DROP KEYSPACE keyspace1;" cassandra || true
30+
31+
#if [ $? -eq 0 ]
32+
#then
33+
# echo "Successfully dropped keyspace keyspace1"
34+
#else
35+
# echo "Could not drop keyspace keyspace1" >&2
36+
#fi
37+
38+
#cqlsh --request-timeout=60 -e "DROP KEYSPACE system;" cassandra || true
39+
40+
#if [ $? -eq 0 ]
41+
#then
42+
# echo "Successfully dropped system keyspace"
43+
#else
44+
# echo "Could not drop system keyspace" >&2
45+
#fi
46+
47+
## NOTES - rm -rf /cassandra_data/data/system/peers*/*
48+
## DO AS INIT CONTAINER ON STS
49+
## $env:JVM_OPTS="$JVM_OPTS -Dcassandra.load_ring_state=false"

cassandra/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ The official documentation for cassandra-stress can be found [here](https://cass
1111

1212

1313
### Technical Process
14-
UPDATE: we moved the sequiential test runs into the trial template for the experiment itself, using the image from cassandra 4 which contains the
15-
cassandra-stress tools. We've kept all the older related manifests/docker files in this repo as an example of how to wrap your own load test into a
16-
customer docker image.
17-
1814
In order to get the cassandra-stress to run all three load tests under one experiment trial, we needed to create a container for that task.
1915
You can find the Dockerfile and related artifacts [here](https://www.github.com/thecrudge/cstress) or in the Docker folder. Essentially its
2016
an image that runs an entrypoint with a very basic script to run all three load tests consecutively. You can customize your load test parameters
@@ -26,7 +22,7 @@ In the experiment spec, you can see the parameters we are using for our experime
2622
spec:
2723
optimization:
2824
- name: "experimentBudget"
29-
value: "40" #number of trials
25+
value: "120" #number of trials
3026
parameters:
3127
- name: memory
3228
min: 500
@@ -160,7 +156,7 @@ cassandra-write-read-mixed-example-001 Running MAX_HEAP_SIZE=1413, cpu=618
160156
```
161157

162158
## Results
163-
The image below shows us that the machine learning has recommended trial number 35. With this trial we can see we have a cost savings of 59.70%
159+
The image below shows us that the machine learning has recommended trial number #98. With this trial we can see we have a cost savings of 34.29%
164160
compared to our baseline in Trial #1.
165161

166162
<img src="img/results1.png" width="400">

cassandra/cassandra-full-experiment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
optimization:
77
- name: "experimentBudget"
8-
value: "40" #number of trials
8+
value: "120" #number of trials
99
parameters:
1010
- name: memory
1111
min: 500

cassandra/cassandra-sts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
terminationGracePeriodSeconds: 1800
3333
containers:
3434
- name: cassandra
35-
image: gcr.io/google-samples/cassandra:v13
35+
image: gcr.io/google-samples/cassandra:v14
3636
imagePullPolicy: Always
3737
ports:
3838
- containerPort: 7000
@@ -62,6 +62,8 @@ spec:
6262
- -c
6363
- nodetool drain
6464
env:
65+
# - name: JVM_OPTS
66+
# value: "$JVM_OPTS -Dcassandra.load_ring_state=false"
6567
- name: MAX_HEAP_SIZE
6668
value: 512M
6769
- name: HEAP_NEWSIZE

cassandra/img/results1.png

1.27 KB
Loading

cassandra/img/results2.png

336 Bytes
Loading

cassandra/img/results3.png

9.24 KB
Loading

cassandra/latest-cassandra-full-experiment.yaml

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)