summaryrefslogtreecommitdiff
path: root/catlfish-benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'catlfish-benchmark')
-rw-r--r--catlfish-benchmark/Dockerfile8
-rw-r--r--catlfish-benchmark/Makefile15
-rw-r--r--catlfish-benchmark/bench.sh33
-rw-r--r--catlfish-benchmark/catlfish.cfg26
-rw-r--r--catlfish-benchmark/fest.cfg29
-rw-r--r--catlfish-benchmark/merge.cfg10
-rw-r--r--catlfish-benchmark/mergebackup.cfg26
-rw-r--r--catlfish-benchmark/signing.cfg18
-rw-r--r--catlfish-benchmark/submit.sh4
9 files changed, 169 insertions, 0 deletions
diff --git a/catlfish-benchmark/Dockerfile b/catlfish-benchmark/Dockerfile
new file mode 100644
index 0000000..7ade722
--- /dev/null
+++ b/catlfish-benchmark/Dockerfile
@@ -0,0 +1,8 @@
+FROM catlfish-dev
+RUN apt-get update
+RUN echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
+
+#USER catlfish
+ADD catlfish.config merge.config /usr/local/etc/catlfish/
+ADD bench.sh /var/run/catlfish/
+ENTRYPOINT ["/var/run/catlfish/bench.sh"]
diff --git a/catlfish-benchmark/Makefile b/catlfish-benchmark/Makefile
new file mode 100644
index 0000000..cdd4b94
--- /dev/null
+++ b/catlfish-benchmark/Makefile
@@ -0,0 +1,15 @@
+CATLFISH_BASE = ~/p/ct/catlfish
+
+all: config
+
+config: fest.config signing.config mergebackup.config merge.cfg catlfish.cfg
+
+frontend.config storage.config: fest.cfg catlfish.cfg
+ $(CATLFISH_BASE)/tools/compileconfig.py --config catlfish.cfg --localconfig $<
+signing.config: signing.cfg catlfish.cfg
+ $(CATLFISH_BASE)/tools/compileconfig.py --config catlfish.cfg --localconfig $<
+mergebackup.config: mergebackup.cfg catlfish.cfg
+ $(CATLFISH_BASE)/tools/compileconfig.py --config catlfish.cfg --localconfig $<
+
+fest.config: frontend.config storage.config
+ @echo TODO merge $^ into $@
diff --git a/catlfish-benchmark/bench.sh b/catlfish-benchmark/bench.sh
new file mode 100644
index 0000000..126b4af
--- /dev/null
+++ b/catlfish-benchmark/bench.sh
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+iterations=2
+chunksize=10000
+[ -n "$1" ] && { ierations=$1; shift; }
+[ -n "$1" ] && { chunksize=$1; shift; }
+
+erlbase=/usr/local/catlfish
+
+for nodename in mergebackup signing fest; do
+ mkdir -p /var/run/catlfish/erlang_log/$nodename
+ echo "Starting $nodename"
+ $erlbase/bin/run_erl -daemon \
+ /var/run/catlfish/ \
+ /var/run/catlfish/erlang_log/$nodename/ \
+ "exec $erlbase/bin/erl -config $nodename"
+done
+
+for iter in $iterations; do
+ echo "Iteration ${iter}/${iterations} starting"
+
+ ./submit.sh $chunksize
+
+ echo "$0: merging"
+ date
+ python /usr/local/src/catlfish/tools/merge.py \
+ --config /usr/local/etc/catlfish/catlfish.cfg \
+ --localconfig /usr/local/etc/catlfish/merge.cfg \
+ --timing
+ date
+
+ echo "Iteration ${iter}/${iterations} finished"
+done
diff --git a/catlfish-benchmark/catlfish.cfg b/catlfish-benchmark/catlfish.cfg
new file mode 100644
index 0000000..3f93a05
--- /dev/null
+++ b/catlfish-benchmark/catlfish.cfg
@@ -0,0 +1,26 @@
+baseurl: https://localhost:8080/
+
+frontendnodes:
+ - name: frontend
+ publicaddress: localhost:8080
+ address: localhost:8082
+
+storagenodes:
+ - name: storage
+ address: localhost:8081
+
+signingnodes:
+ - name: signing
+ address: localhost:8088
+
+mergenodes:
+ - name: merge
+ address: localhost:8180
+ - name: mergebackup
+ address: localhost:8181
+
+primarymergenode: merge
+
+storage-quorum-size: 1
+
+mmd: 86400
diff --git a/catlfish-benchmark/fest.cfg b/catlfish-benchmark/fest.cfg
new file mode 100644
index 0000000..74df9c1
--- /dev/null
+++ b/catlfish-benchmark/fest.cfg
@@ -0,0 +1,29 @@
+localnodes:
+ - frontend
+ - storage
+
+addresses:
+ frontend: 127.0.0.1:8082
+ storage: 127.0.0.1:8081
+ mergebackup: 127.0.0.1:8181
+
+publicaddresses:
+ frontend: 127.0.0.1:8080
+
+paths:
+ configdir: .
+
+ knownroots: known_roots
+ https_certfile: httpscert/httpscert.pem
+ https_keyfile: httpscert/httpskey.pem
+ https_cacertfile: httpsca/demoCA/cacert.pem
+ public_cacertfile: httpsca/demoCA/cacert.pem
+ publickeys: publickeys
+ privatekeys: privatekeys
+ logpublickey: keys/logkey.pem
+ logprivatekey: keys/logkey-private.pem
+
+ db: /var/run/catlfish/bench/fest/db/
+
+ratelimits:
+ add_chain: 10 per second
diff --git a/catlfish-benchmark/merge.cfg b/catlfish-benchmark/merge.cfg
new file mode 100644
index 0000000..61b41f2
--- /dev/null
+++ b/catlfish-benchmark/merge.cfg
@@ -0,0 +1,10 @@
+nodename: merge
+
+paths:
+ https_cacertfile: httpsca/demoCA/cacert.pem
+ publickeys: publickeys
+ logpublickey: keys/logkey.pem
+ privatekeys: privatekeys
+ known_roots: known_roots/
+
+ mergedb: /var/run/catlfish/bench/merge/db
diff --git a/catlfish-benchmark/mergebackup.cfg b/catlfish-benchmark/mergebackup.cfg
new file mode 100644
index 0000000..64c993f
--- /dev/null
+++ b/catlfish-benchmark/mergebackup.cfg
@@ -0,0 +1,26 @@
+localnodes:
+ - mergebackup
+
+addresses:
+ mergebackup: 127.0.0.1:8181
+
+paths:
+ configdir: .
+
+ knownroots: known_roots
+ https_certfile: httpscert/httpscert.pem
+ https_keyfile: httpscert/httpskey.pem
+ https_cacertfile: httpsca/demoCA/cacert.pem
+ public_cacertfile: httpsca/demoCA/cacert.pem
+ publickeys: publickeys
+ privatekeys: privatekeys
+ logpublickey: keys/logkey.pem
+ logprivatekey: keys/logkey-private.pem
+
+ mergedb: /var/run/catlfish/bench/mergebackup/db
+
+ratelimits:
+ add_chain: 10 per second
+
+#options:
+# - sctcaching
diff --git a/catlfish-benchmark/signing.cfg b/catlfish-benchmark/signing.cfg
new file mode 100644
index 0000000..16f0346
--- /dev/null
+++ b/catlfish-benchmark/signing.cfg
@@ -0,0 +1,18 @@
+localnodes:
+ - signing
+
+addresses:
+ signing: 127.0.0.1:8088
+
+paths:
+ configdir: .
+
+ knownroots: known_roots
+ https_certfile: httpscert/httpscert.pem
+ https_keyfile: httpscert/httpskey.pem
+ https_cacertfile: httpsca/demoCA/cacert.pem
+ public_cacertfile: httpsca/demoCA/cacert.pem
+ publickeys: publickeys
+ privatekeys: privatekeys
+ logpublickey: keys/logkey.pem
+ logprivatekey: keys/logkey-private.pem
diff --git a/catlfish-benchmark/submit.sh b/catlfish-benchmark/submit.sh
new file mode 100644
index 0000000..87fee86
--- /dev/null
+++ b/catlfish-benchmark/submit.sh
@@ -0,0 +1,4 @@
+#! Create and submit $1 certs.
+
+echo TODO: Create and submit $1 certs.
+