Skip to content

Commit 77fa029

Browse files
Include rate-limiting Readme section (#245)
1 parent e08d4cf commit 77fa029

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,42 @@ Also, the ratio and the key generator is per client (and not connection).
184184
In this case, setting the ratio to 1:1 does not guarantee 100% hits because
185185
the keys spread to different connections/nodes.
186186

187+
188+
189+
### Using rate-limiting for informed benchmarking
190+
191+
When you impose a rate limit on your benchmark tests, you're essentially mimicking a controlled production environment. This setup is crucial for understanding how latency behaves under certain throughput constraints. Here's why benchmarking latency in a rate-limited scenario is important:
192+
193+
194+
1. **Realistic Performance Metrics**: In real-world scenarios, systems often operate under various limitations. Understanding how these limitations affect latency gives you a more accurate picture of system performance, than simply running benchmarks at full stress level.
195+
196+
1. **Capacity Planning**: By observing latency at different rate limits, you can better plan for scaling your infrastructure. It helps in identifying at what point increased load leads to unacceptable latency, guiding decisions about when to scale up.
197+
198+
1. **Quality of Service (QoS) Guarantees**: For services that require a certain level of performance guarantee, knowing the latency at specific rate limits helps in setting realistic QoS benchmarks.
199+
200+
1. **Identifying Bottlenecks**: Rate-limited benchmarking can help in identifying bottlenecks in your system. If latency increases disproportionately with a small increase in rate limit, it may indicate a bottleneck that needs attention.
201+
202+
1. **Comparative Analysis**: It enables the comparison of different solutions, configurations or hardware in terms of how they handle latency under simmilar benchmark conditions.
203+
204+
205+
#### Using rate-limiting in memtier
206+
207+
To use this feature, add the `--rate-limiting`` parameter followed by the desired RPS per connection.
208+
209+
210+
```
211+
memtier_benchmark [other options] --rate-limiting=<RPS>
212+
```
213+
214+
Note: When using rate-limiting together with cluster-mode option, the rate-limit is associated to the connection for each node.
215+
216+
217+
#### Rate limited example: 100% writes, 1M Keys, 60 seconds benchmark at 10K RPS
218+
219+
```
220+
memtier_benchmark --ratio=1:0 --test-time=60 --rate-limiting=100 -t 2 -c 50 --key-pattern=P:P --key-maximum 1000000
221+
```
222+
187223
### Full latency spectrum analysis
188224

189225
For distributions that are non-normal, such as the latency, many “basic rules” of normally distributed statistics are violated. Instead of computing just the mean, which tries to express the whole distribution in a single result, we can use a sampling of the distribution at intervals -- percentiles, which tell you how many requests actually would experience that delay.

0 commit comments

Comments
 (0)