Time to Load Redis Snapshots
As part of investigating Redis I needed to understand the impact on availability of a Redis node soft-crashing or being restarted. Redis has configurable snapshotting to disk which can be tuned to update the on-disk snapshot after a minimum specified number of changes over a period of time, making it possible to retain as much of your data as you're willing to pay the performance cost for.
The next question is how quickly can it reload the snapshots?
With this in mind I generated loads of varying sizes to get a rough understanding:
Number Keys | Memory Consumption (MB) | Time to Load Snapshot (seconds) |
1000 | 1.24 | 0 |
10,000 | 3.29 | 0 |
100,000 | 23.39 | 0 |
1,000,000 | 222.65 | 1 |
2,000,000 | 444.27 | 2 |
3,000,000 | 673.90 | 3 |
5,000,000 | 1165.15 | 5 |
The growth of load time appears linear with an inconclusive uptick at the end (I'm tempted to believe it remains linear but I lack--ya know--data to support that belief).
These brief tests were conducted using the 64bit version of Redis 2.0.0 rc4 on OS X Snow Leopard.