Comments (10)
Probably because the hash map is protected by a single mutex instead of doing something more clever.
from mini-redis.
that's all? it's really very very slow.
from mini-redis.
Another difference is that mini-redis does not support pipelining.
from mini-redis.
It is doubtfully the mutex and probably pipelining. When running benchmarks, be sure to not pipeline.
from mini-redis.
What is the reason pipeline is so slow? I see that when I use pipeline on redis-benchamrk
the CPU drop to almost zero usage.
from mini-redis.
Because pipelining in mini-redis is not implemented.
from mini-redis.
Thanks @carllerche but what is require to implement it? Why the fact that the client sends another command before getting the pre command reply causes such a CPU drop (and with it a performance drop)?
from mini-redis.
Pipelining requires that you can start processing the next message before responding to the first. Mini-redis will not implement it.
from mini-redis.
I agree it will be far from Redis performance but I do not understand why it is so bad. With pipeline of 2 I got like 40 ops/sec and CPU usage drop to around 1%. Why the processes stays idle for so long?
from mini-redis.
OK, I think I found the answer, if I set TCP_NODELAY
flag the performance are not dropped so drastically and we can even gain better performance from pipeline.
Without TCP_NODELAY
:
> redis-benchmark -c 1 -n 1000000 -P 2 get x
WARNING: Could not fetch server CONFIG
get x: rps=47.8 (overall: 45.8) avg_msec=0.449 (overall: 0.430)
With TCP_NODELAY
:
> redis-benchmark -c 1 -n 1000000 -P 2 get x
WARNING: Could not fetch server CONFIG
get x: rps=60672.0 (overall: 59762.0) avg_msec=0.020 (overall: 0.021)
from mini-redis.
Related Issues (20)
- The `chat` example is empty HOT 2
- Potential bug in read_frame if we receive 2 frames ready in the buffer? HOT 1
- Benches for mini-redis HOT 2
- why is `frame` serialized to string should be removed the first element?
- Using BTreeSet instead of BTreemap HOT 1
- The `Frame::Integer` should be signed 64-bit integer HOT 2
- panic in VSCode terminal HOT 1
- Fails when install mini-redis with the latest rustc version HOT 1
- theoretically bug in db.set method? HOT 2
- Why itparsing is set to fail when frame is not array?
- dtrace user stacks not generating HOT 1
- Release
- failed to load macro HOT 1
- how to config memory to be used? HOT 3
- Confusing use of `notify` HOT 4
- updates? HOT 6
- Question: `shutdown_complete_rx` never used in the `Listner` HOT 2
- Fails with Latest Rust HOT 1
- bug in implementation of display for frame
- Add (optional) OpenTelemetry + Xray integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mini-redis.