Working script

This commit is contained in:
Quentin 2021-12-09 18:41:50 +01:00
parent f1d329fff6
commit ebce30a1f2
Signed by: quentin
GPG Key ID: A98E9B769E4FF428
3 changed files with 17 additions and 13 deletions

View File

@ -40,8 +40,11 @@ if (!file.exists("50ms.garage.csv")) {
system("mknet run-all ./mknet/deploy_garage.sh")
system("mknet run dc1:dc1s1 ./mknet/bench_garage.sh")
system("mknet destroy")
print("sleeping for 5 secs to wait for teardown")
Sys.sleep(5)
}
if (!file.exists("50ms.minio.csv")) {
if (file.exists(".current_state.yml")) {
system("mknet destroy")
@ -54,13 +57,13 @@ if (!file.exists("50ms.minio.csv")) {
read_csv("50ms.garage.csv") %>% add_column(daemon="garage 0.5.0") -> a
read_csv("50ms.minio.csv") %>% add_column(daemon="minio RELEASE.2021-11-24T23-19-33Z") -> b
bind_rows(a,b) %>% group_by(daemon,op) %>% summarise(
time_mean = mean(time),
time_max = max(time),
time_min = min(time)
bind_rows(a,b) %>% group_by(daemon,endpoint) %>% summarise(
time_mean = mean(nanoseconds) / 1000 / 1000,
time_max = max(nanoseconds) / 1000 / 1000,
time_min = min(nanoseconds) / 1000 / 1000
) -> c
ggplot(c, aes(x=op,y=time_mean,fill=daemon,ymin=time_min,ymax=time_max)) +
ggplot(c, aes(x=endpoint,y=time_mean,fill=daemon,ymin=time_min,ymax=time_max)) +
geom_bar(stat="identity", position=position_dodge(),color="black") +
geom_errorbar(position=position_dodge(.9),width=.2) +
scale_y_continuous(expand=c(0,0))+
@ -72,6 +75,7 @@ ggplot(c, aes(x=op,y=time_mean,fill=daemon,ymin=time_min,ymax=time_max)) +
caption="Get the code to reproduce this graph at https://git.deuxfleurs.fr/quentin/benchmarks",
title="S3 endpoint latency in a simulated geo-distributed cluster",
subtitle="100 measurements, 5 nodes, 100ms RTT + 20ms jitter between nodes\nno contention: latency is due to intra-cluster communications\ncolored bar = mean latency, error bar = min and max") +
theme_classic() +
ggsave("endpoint-latency.png", width=200, height=110, units="mm")
theme_classic() +
theme(legend.position = c(.8, .3))
ggsave("endpoint-latency.png", width=200, height=110, units="mm")

View File

@ -1,9 +1,9 @@
#!/bin/bash
echo "sleep 60"
sleep 60
echo "sleep 3 min to wait for minio bootstrap"
sleep 180
export ENDPOINT=[fc00:9a7a:9e::1]:9000
export ENDPOINT=localhost:9000
export AWS_ACCESS_KEY_ID=minioadmin
export AWS_SECRET_ACCESS_KEY=minioadmin

View File

@ -19,7 +19,7 @@ def leader():
sock.bind(UNIX_SOCK)
sock.listen()
n_serv = os.environ['SIZE']
n_serv = int(os.environ['SIZE'])
fl = [ co for co, addr in [ sock.accept() for i in range(n_serv - 1) ]]
identities = [ json.loads(co.makefile().readline()) for co in fl ] + [ { "ip": os.environ['IP'], "path": make_data() } ]
@ -52,7 +52,7 @@ def make_data():
return data_path
def run_minio(identities):
cmd = f"minio server --console-address ':9001' --address [{os.environ['IP']}]:9000"
cmd = f"minio server --console-address ':9001' --address ':9000'"
for ident in identities:
cmd += f" http://[{ident['ip']}]:9000{ident['path']}"
cmd += f" > {os.path.join(STORAGE_PATH, 'minio'+os.environ['ID']+'.log')} 2>&1"