Monday 8 January 2018

performance - Can SSD raid be faster than ramdisk?


So a typical ssd will have a read speed of 250 - 500 mb / second. And a ram will have about 10x than that.


My question is: Can 4 ssds with raid-0 be faster than a single ram memory block for some reason?


I am either going to go with lots of ram and ramdisk, or 4 ssds with raid-0. Which is faster?



Answer




So a typical ssd will have a read speed of 250 - 500 mb / second. And a ram will have about 10x than that.



Just what kind of RAM are you referring to? Certainly not something that has been in common use in PCs recently, it would seem.


DDR3 SDRAM can trivially give you a transfer rate of around 10 GB/s (you need DDR3-1333 for that) and currently tops out at about 17 GB/s for DDR3-2133.


Let's say you stripe four SSDs capable of delivering 500 MB/s and the overall system is capable of handling that (no bus contention, the system is still I/O-bound, etc.). This gives you a theoretical maximum throughput of 2 GB/s. The 4xSSD loses out by nearly a factor of 10.


DDR3 SDRAM has a latency in the 10 ns region. A good SSD might give you 100k IOPS, tops, which translates to a latency of 10,000 ns. (For example, the Intel 530 specifies a 41k IOPS for random 4k reads, which gives you a latency of nearly 25,000 ns.)


Stripe four fast SSDs and ignore all overhead, and you might get 400k IOPS, or 2,500 ns latency. The 4xSSD loses out by a factor of 250.


The data from the SSD has to go to somewhere, and that "somewhere" will be RAM. The CPU can grab it from there, but it does not talk directly to the SSD any more than it talks directly to a spinning-platter hard disk drive.


If we assume that you don't suffer from bus contention on the SSD, it makes sense to assume the same thing for the RAM. Which leads to the conclusion that by either of these metrics, a SSD is horrendeously slow compared to DDR3 SDRAM.


RAM has other drawbacks. Even compared to SSDs it is very expensive per gigabyte, and it needs constant power to retain its contents. Also, a RAM disk does not function quite the same as RAM, as it is a software construct in the operating system. You should still get most of the performance benefit of RAM, but you lose out on the same amount of RAM which may cause the system to need to resort to swapping more often (which is a death sentence for performance) and it likely won't give quite the same performance as raw RAM would.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...