Why is a Ramdisk so fast?

Solution
RAM is a totally different type of storage designed for quite a different purpose.

The biggest difference with RAM is that it's not persistent, which means it loses all it's data as soon as the power is removed. Hard Drives (and SSDs) on the other hand, need to be able to retain their data without power, otherwise your system would get wiped every time you powered off. On an architectural level, that means RAM can be designed completely differently.

What that means in real terms is that RAM can have much higher throughput (MB per second), with vastly lower latency and can handle thousands of times more operations per second. Of course, it costs way more, requires dedicated memory controllers and must be located physically very close...
Hard drives have moving parts, they are limited by how fast they can move. This also increases latency(the time it takes to get from point A to point B). Many programs have LOTS of random reads/writes and that is one area that even the fastest hard drives have a harder time than solid state devices.

For sequential read/writes, you can get pretty fast hard drives and hard drive arrays, but the random numbers(and access times) do NOT get better.

Image. look at how much a hard drive looses under some loads. Even any old SSD will be MUCH faster under most normal work loads than a hard drive(fast access times under 1ms).
2ykcci9.jpg
 

USAFRet

Titan
Moderator


You're using part of your actual system RAM to be a substitute for actual hard drive space.
RAM is monumentally faster than a physical hard drive. This comes at a price. $$$.
 
RAM is a totally different type of storage designed for quite a different purpose.

The biggest difference with RAM is that it's not persistent, which means it loses all it's data as soon as the power is removed. Hard Drives (and SSDs) on the other hand, need to be able to retain their data without power, otherwise your system would get wiped every time you powered off. On an architectural level, that means RAM can be designed completely differently.

What that means in real terms is that RAM can have much higher throughput (MB per second), with vastly lower latency and can handle thousands of times more operations per second. Of course, it costs way more, requires dedicated memory controllers and must be located physically very close to on the CPU, isn't able to retain data without power, and costs way, way more.
 
Solution