Redis and M2 SSD drives

113 views
Skip to first unread message

marc perkel

unread,
Mar 14, 2017, 11:59:29 AM3/14/17
to Redis DB
A little creative thinking here. Maybe I'm nuts - but ...

New M2 SSD drives are 5x as fast as Sata 3 drives. I'm wondering if they were used as a swap partition that it might be fast enough to exceed ram without a huge performance hit. Anyone have any thoughts on this?

hva...@gmail.com

unread,
Mar 14, 2017, 2:59:56 PM3/14/17
to Redis DB
Not good enough.  See this discussion from several years ago about the relative speeds of RAM, SSD, and HD.  In that comparison, HD was 400,000x slower than RAM.  SSD being 5x faster than HD still means it's 80,000x slower than RAM.  Current speeds of RAM, SSD, and HD may have changed since that was posted, but not by enough.

Marc Perkel

unread,
Mar 14, 2017, 3:30:31 PM3/14/17
to redi...@googlegroups.com
SSD is a lot more than 5X SDD in that there is 0 seek time. I agree with what people might have concluded several years ago but I think it needs revisited.

To be clear - I don't think it would replace ram - but for short term overages - maybe 20% - could you get away with it?
--
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/VNbBRNXe_kA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

hva...@gmail.com

unread,
Mar 15, 2017, 12:51:42 AM3/15/17
to Redis DB
The SSD speed in that comparison already discarded the non-existent seek time.  I'm not seeing documentation that the random access time for modern SSD drives is significantly faster than 100 microseconds (or 0.1 milliseconds), and that RAM speed was for a fairly old DDR2 module.  I would expect RAM speeds to have increased.

The difference is still extremely large.  You could make the SSD 10x faster and the SSD would still be 2200x slower than RAM.  Using the comparison's analogy of RAM being the time it takes to pick up a coffee/tea/soda from the desk and bring it to your lips (1 second), getting it from SSD would be like ordering it from a pizza restaurant: 37 minutes (2200 seconds).

You can experiment with it, but you'll find that the difference is so great that your Redis clients will start timing out.  Remember that making the operating system move RAM to the swap device involves creating a shortfall of RAM.  Not enough available.  The OS moves RAM to the swap device in 4K chunks that usually don't match well with Redis's data structures.  I.e., it won't be only the idle keys that are pushed to swap, but some of the more active ones also.  And the waiting that the clients do as the active keys are pulled back into RAM will almost always make the clients open more connections to Redis, which makes Redis consume more RAM for the connection buffers....and a snowball effect happens.

When it comes to Redis, most swap devices are simply not fast enough to make a useful replacement for RAM.  It's an interesting idea, but so far it's not a practical one.

CharSyam

unread,
Mar 15, 2017, 4:54:20 AM3/15/17
to redi...@googlegroups.com
I also tried to use NVMe Storage.
even though, NVMe is very fast. but NVMe is slower than Memory.
and the second important thing is we can't control which page is hot or cold.
> 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

Paul L

unread,
Mar 15, 2017, 11:00:36 AM3/15/17
to Redis DB
If access speed isnt a huge concern, and you need "larger than ram" then what I did was overcommit memory in an ESXi virtual machine and put its swap on the SSD.  The speed impact on larger sorted sets is OK for what it does, just not as fast as RAM.  I did it this way instead of "swap inside the OS" as it just gave me less trouble on testing it
Reply all
Reply to author
Forward
0 new messages