Using Redis tmpfs?

284 views
Skip to first unread message

Mike Appenzellar

unread,
Apr 17, 2014, 10:01:38 AM4/17/14
to redi...@googlegroups.com
Has anyone on hear configured Redis to work with tmpfs? If so, how did you do it? Being that portion is volatile how to you keep your data on reboots, etc?

Josiah Carlson

unread,
Apr 17, 2014, 11:08:46 AM4/17/14
to redi...@googlegroups.com
The only way to keep the data between reboots is to copy the data out before shutdown, then back in after startup. You'd probably want to copy out immediately after snapshots, and probably avoid AOF.

Honestly, there really is no substantive gain in using tempfs for this unless you can't write to any other part of the filesystem, or unless you've got battery-backed machine that can dump your data somewhere else in the case of power failure (though general system failures could still be catastrophic).

 - Josiah


On Thu, Apr 17, 2014 at 7:01 AM, Mike Appenzellar <mappen...@gmail.com> wrote:
Has anyone on hear configured Redis to work with tmpfs? If so, how did you do it? Being that portion is volatile how to you keep your data on reboots, etc?

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Mike Appenzellar

unread,
Apr 17, 2014, 1:10:13 PM4/17/14
to redi...@googlegroups.com
I am in a compact flash card environment. With that said, the more I can limit reads/writes the better! 


--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/arHi3bmp8CQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+u...@googlegroups.com.

Felix Gallo

unread,
Apr 17, 2014, 1:41:10 PM4/17/14
to redi...@googlegroups.com
compact flash has very slow write characteristics and intriguing behavior under power fail conditions, so be sure to understand exactly what happens when someone yanks the plug/battery on your device.

when I did embedded hardware, we put a supercap on the board so that we were guaranteed N seconds of lifetime when a power-down signal was received, and made sure that N was greater than the necessary time to get quiescent.  This is about the best you can do with standard linux in my experience.

in an embedded environment you will almost certainly want to control when disk writes happen, so consider either turning off all serialization and managing it yourself via SAVE/BGSAVE or custom written save routines, or gaining a deep understanding of AOF and adding tuning parameters to its execution specific to your environment and use case.

F.

Josiah Carlson

unread,
Apr 17, 2014, 4:09:41 PM4/17/14
to redi...@googlegroups.com
You still have not mentioned how much RAM you have, how much data you want to store, how robust to failure you want to be, or really anything other than being in an embedded environment with CF storage. Please help us help you.

 - Josiah
Reply all
Reply to author
Forward
0 new messages