I’m thinking about using Redis as a store for some highly transient data (we’re talking it will live for maybe 30s at a time before being evicted). I know that Redis spawns a worker every so often to persist to disk when persistence is enabled. If I disable the persistence mechanism, what sort of performance benefit will that give to the rest of the system.
Also, does anyone see any downsides to this — since if the data is lost recovering it is pointless anyway because it is probably expired already?
If your data has that little short life span, you probably don’t want to persist them. With disabled persistence you get no I/O load from redis and also no memory spikes which may occur during saves. When redis wants to dump data, it forks itself and keeps working. But if it is under heavy write load, then modified keys have to be copied while dump is in progress. It’s so called Copy-on-write mechanism.
When you don’t need your data to be persisted, it definitely makes sense to not persist.