Skip to content

Commit

Permalink
add performance section
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Feb 17, 2025
1 parent 68a875b commit a5bb13d
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions _posts/2023-12-17-bradis.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,53 @@ Also, try some commands that use two clients.

<div id="repl-two"></div>

* A server that listens on a port and accepts connections over TCP.
* An [implementation][respite] of the [RESP protocol][resp].
### Performance

One of my main goals was to create something that is reasonably competitive
with C-Redis from a latency and throughput standpoint. According to
`redis-benchmark`, C-Redis is 1.7 times as fast as Bradis. I have some ideas
for closing that gap, but I'm pretty happy to be in the same order of
magnitude. 100k requests per second is pretty fast!

Bradis:

```
~: redis-benchmark -t set -n 1000000 -c 20 -p 3333
====== SET ======
1000000 requests completed in 9.57 seconds
20 parallel clients
3 bytes payload
keep alive: 1
multi-thread: no
Summary:
throughput summary: 104471.38 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.109 0.040 0.111 0.127 0.143 0.591
```

C-Redis:

```
~: redis-benchmark -t set -n 1000000 -c 20
====== SET ======
1000000 requests completed in 5.73 seconds
20 parallel clients
3 bytes payload
keep alive: 1
host configuration "save": 3600 1 300 100 60 10000
host configuration "appendonly": no
multi-thread: no
Summary:
throughput summary: 174581.00 requests per second
latency summary (msec):
avg min p50 p95 p99 max
0.067 0.024 0.063 0.119 0.175 1.799
```

<hr>

Expand Down

0 comments on commit a5bb13d

Please sign in to comment.