Skip to content

Instantly share code, notes, and snippets.

View buraksezer's full-sized avatar

Burak Sezer buraksezer

View GitHub Profile
# KRONOTOP
➜ bin ./memtier_benchmark -s 127.0.0.1 -p 5484
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 12 secs] 0 threads: 2000000 ops, 164969 (avg: 166321) ops/sec, 6.84MB/sec (avg: 6.89MB/sec), 1.21 (avg: 1.20) msec latency
4 Threads
50 Connections per thread
@buraksezer
buraksezer / gist:24db22cbbafca635e67293d2c47a21ee
Last active March 14, 2022 13:01
Olric vs Redis - redis-benchmark thread=4 client=50
====== Summary ======
Olric:
throughput summary: 147145.38 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.259 0.016 0.159 0.559 1.111 32.623
Redis:
throughput summary: 108084.74 requests per second
olricd version 0.5.0-alpha.2 go1.18rc1 linux/amd64
./memtier_benchmark -p 3320 --command="dm.put bench __key__ brk"
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 11 secs] 0 threads: 2000000 ops, 176343 (avg: 173592) ops/sec, 10.57MB/sec (avg: 10.41MB/sec), 1.13 (avg: 1.15) msec latency
4 Threads
50 Connections per thread
@buraksezer
buraksezer / gist:08dc11fcfdbcb019e1688306f11f3915
Created March 13, 2022 16:43
Olric vs Redis on macOS go1.18rc1
Olric
./memtier_benchmark -p3320 --command="dm.put bench __key__ brk"
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 18 secs] 0 threads: 2000000 ops, 169878 (avg: 107183) ops/sec, 10.19MB/sec (avg: 6.43MB/sec), 1.18 (avg: 1.86) msec latency
4 Threads
50 Connections per thread
@buraksezer
buraksezer / olric-go.go
Last active February 5, 2022 10:27
Olric-Go, bootstrapping
package olricgo
import (
"context"
"encoding/json"
"testing"
"github.com/stretchr/testify/require"
)
### olricd 0.5.0-alpha.1 with runtime go1.16.10 ###
Writing results to stdout
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 100%, 5 secs] 0 threads: 1000000 ops, 186330 (avg: 184752) ops/sec, 11.17MB/sec (avg: 11.08MB/sec), 0.54 (avg: 0.54) msec latency
5 Threads
20 Connections per thread
10000 Requests per client
-bash-5.0$ olricd -c cmd/olricd/olricd.yaml
2021/03/16 19:24:08 [olricd] pid: 70275 has been started
2021/03/16 19:24:08 [INFO] Storage engine has been loaded: olric.kvstore => olric.go:290
2021/03/16 19:24:08 [INFO] Join completed. Synced with 0 initial nodes => discovery.go:59
2021/03/16 19:24:11 [ERROR] Failed to update routing table on 10.0.2.15:3320: read tcp 10.0.2.15:3184->10.0.2.15:3320: i/o timeout => update.go:58
2021/03/16 19:24:11 [INFO] Memberlist bindAddr: 10.0.2.15, bindPort: 3322 => routingtable.go:393
2021/03/16 19:24:11 [INFO] Cluster coordinator: 10.0.2.15:3320 => routingtable.go:394
2021/03/16 19:24:11 [INFO] Node name in the cluster: 10.0.2.15:3320 => olric.go:494
2021/03/16 19:24:11 [INFO] Olric bindAddr: 10.0.2.15, bindPort: 3320 => olric.go:498
2021/03/16 19:24:11 [olricd] Failed to run Olric: set tcp 10.0.2.15:3320->10.0.2.15:3184: protocol not available
cd := &discovery.CloudDiscovery{}
labelSelector := fmt.Sprintf("app.kubernetes.io/name=%s,app.kubernetes.io/instance=%s", name, instance)
c.ServiceDiscovery = map[string]interface{}{
"plugin": cd,
"provider": "k8s",
"args": fmt.Sprintf("namespace=%s label_selector=\"%s\"", namespace, labelSelector),
}
@buraksezer
buraksezer / dtopic-client.go
Last active August 4, 2020 12:06
Initial implementation of distributed topic
package main
import (
"context"
"fmt"
"log"
"github.com/buraksezer/olric"
"github.com/buraksezer/olric/client"
"github.com/buraksezer/olric/serializer"
WARNING: [3.12.3] [dev] [hz.client_1] Error connecting to Address(host=localhost, port=5701)
Traceback (most recent call last):
File "/home/burak/Projects/hazelcast-python-client/hazelcast/cluster.py", line 123, in _connect_to_cluster
self._connect_to_address(address)
File "/home/burak/Projects/hazelcast-python-client/hazelcast/cluster.py", line 170, in _connect_to_address
connection = f.result()
File "/home/burak/Projects/hazelcast-python-client/hazelcast/future.py", line 227, in result
six.reraise(self._exception.__class__, self._exception, self._traceback)
File "/home/burak/Projects/hazelcast-python-client/hazelcast/six.py", line 689, in reraise
raise value