aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--benchmarks/s3concurrent/main.go12
-rw-r--r--scenarios/.garage-s3lat.swobin12288 -> 0 bytes
-rw-r--r--topo/dc.yml22
4 files changed, 35 insertions, 1 deletions
diff --git a/README.md b/README.md
index f49f574..b9dddff 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ source .venv/bin/activate
## Topologies
All topologies:
+ - `./topo/dc.yml` - A 3 node topology connected with a 1Gbit/s link and a 1ms latency
- `./topo/with-vdsl.yml` - A topology mixing datacenters with fast internal connectivity and an isolated VDSL node
- `./topo/50ms.yml` - An artifical topology simulating nodes with high bandwidth but with a fixed 50ms latency, useful to quantify the impact of latency on a distributed software
- `./topo/multi-dc.yml` - Simulate 3 DC interconnected with 50ms latency WAN network and close to zero latency inside the DC
@@ -41,6 +42,7 @@ Feel free to write new topologies!
All scenarios:
- `./scenarios/garage-s3lat [garage-v0.7|garage-v0.8]` - Run s3lat on Garage
+ - `./scenarios/garage-concurrent [garage-v0.7|garage-v0.8]` - Run s3concurrent on Garage
- `./scenarios/garage-warp [garage-v0.7|garage-v0.8] [default|fast]` - Run warp on Garage. 2 flavors are available: fast and default.
*Scenarios take optional flavors as input that modulate their behavioir. Passing them is not mandatory,
diff --git a/benchmarks/s3concurrent/main.go b/benchmarks/s3concurrent/main.go
index 9f7f3af..55d7b3d 100644
--- a/benchmarks/s3concurrent/main.go
+++ b/benchmarks/s3concurrent/main.go
@@ -3,6 +3,8 @@ package main
import (
"context"
"crypto/tls"
+ "fmt"
+ "time"
"io"
"log"
"math/rand"
@@ -99,24 +101,32 @@ func main() {
}
log.Printf("created bucket %s\n", buck)
+ fmt.Println("sent,success,elapsed,elapsed_per_req")
+
// Send to bucket
for i := 1; i <= 16; i++ {
log.Printf("start concurrent loop with %d coroutines\n", i)
syn := make(chan error)
+
+ start := time.Now()
for j := 1; j <= i; j++ {
go func() {
syn <- putObj(buck, 1024*1024)
}()
}
+ errCount := 0
for j := 1; j <= i; j++ {
cerr := <-syn
if cerr != nil {
+ errCount += 1
log.Printf("%d/%d failed with %s\n", j, i, cerr)
}
}
+ elapsed := time.Since(start)
+ fmt.Printf("%d,%d,%v,%v\n", i, i - errCount, elapsed.Nanoseconds(), elapsed.Nanoseconds() / int64(i))
log.Printf("done, %d coroutines returned\n", i)
}
- log.Println("done")
+ log.Println("bench done")
}
diff --git a/scenarios/.garage-s3lat.swo b/scenarios/.garage-s3lat.swo
deleted file mode 100644
index ec47fd0..0000000
--- a/scenarios/.garage-s3lat.swo
+++ /dev/null
Binary files differ
diff --git a/topo/dc.yml b/topo/dc.yml
new file mode 100644
index 0000000..6017e97
--- /dev/null
+++ b/topo/dc.yml
@@ -0,0 +1,22 @@
+links:
+ - &1000
+ bandwidth: 1000M
+ latency: 1ms
+
+servers:
+ - name: node1
+ <<: *1000
+ - name: node2
+ <<: *1000
+ - name: node3
+ <<: *1000
+
+global:
+ subnet:
+ base: 'fc00:9a7a:9e::'
+ local: 64
+ zone: 16
+ latency-offset: 3ms
+ upstream:
+ ip: fc00:9a7a:9e:ffff:ffff:ffff:ffff:ffff
+ conn: *1000