Time to Load Redis Snapshots

08/23/2010

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 KeysMemory Consumption (MB)Time to Load Snapshot (seconds)
10001.240
10,0003.290
100,00023.390
1,000,000222.651
2,000,000444.272
3,000,000673.903
5,000,0001165.155

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).

Line chart showing Redis time to load for various sizes of files

These brief tests were conducted using the 64bit version of Redis 2.0.0 rc4 on OS X Snow Leopard.

All Rights Reserved, Will Larson 2007 - 2014.