HACKER Q&A
📣 simplotek

Use RAM sticks as SATA drives?


Does anyone know if there is any product that's a SATA drive that you can plug RAM sticks to serve as temporary memory? And how does it fare with regards to performance?


  👤 theandrewbailey Accepted Answer ✓
I recommend that you consider buying a lot of RAM, and using a RAM drive instead. It should be much faster than any SATA-based device (600MB/sec vs whatever your CPU to RAM bandwidth is).

Linux: https://man7.org/linux/man-pages/man5/tmpfs.5.html

Windows: https://sourceforge.net/projects/imdisk-toolkit/


👤 goosedragons
I don't know about SATA drive or anything recent but there was at least one device by Gigabyte called the i-RAM that let you put DDR1 on a card and boot off it. LTT did a video on it a few years ago:

https://m.youtube.com/watch?v=bYbCYgYZVT8


👤 justsomehnguy
Idea of using RAM as a block storage died when $/GB and $/IOPS dropped (with DDR3 and SSD). As you can see nobody bothered with them since 2010[0]

> Also, I presume that a SATA interface to store data in RAM might have better performance than the average SSD.

That totally depends on the silicon capabilities and still would be limited by the SATA. Sure, you would have a very low latency on a random IO, but anything with serious throughput (especially if the block size is small) would quickly saturate the bus. You can see it comparing SATA and NVMe drives from the same vendor and model range.

And a personal anecdote - couple of years ago I did played with a software RAM drive (guess I needed something with tons of IO on a moderate sized load?) and the performance was... not good. Sure, it was a software written by some enthusiast and probably wasn't optimized, but still.

Modern SSDs are around $100-150 per TB, so you would get a better size and performance just buying an NVMe drive, with something like M.2 to PCI-E adapter[1] if needed.

PS of course you can just buy an old server mobo and fill it out with your RAM sticks, make a software RAM drive and expose it over Ethernet with iSCSI or FCoE... but again that wouldn't be cheaper than $100-150 NVMe drive.

[0] https://en.wikipedia.org/wiki/RAM_drive, under "Dedicated hardware RAM drives"

[1] https://www.amazon.com/s?k=m.2+PCIe+converter+card


👤 johnklos
Ages ago Acard, who're makers of popular SCSI-IDE adapters and controller chips, made a 5.25" half height device that could take up to four DDR2 DIMMs, connected to the host computer using SATA, and had options for a CF card and a battery.

I'd use something like this for heavy disk I/O over an SSD any day. Plus, it lets you use memory that would otherwise likely go to waste.

However, those were expensive back then and haven't gotten any cheaper, nor are there newer devices that I know about that'd take newer DIMM types. That'd be nice, though.


👤 trillic
If you have spare PCIe I’d go with an Intel Optane 905P. You can find a used 960GB drive for about $500. They have essentially unlimited write endurance and has latencies closer to RAM than SATA. You’re going to be very dissappointed with both latency and throughout with anything SATA.


👤 tgflynn
What would be the advantage of having a SATA drive with DRAM instead of an SSD ?

The only potential advantage I see would be read and write speed, but aren't SSD's already fast enough to saturate the SATA bus ? Isn't that why NVME offers better performance than SATA ?

What is clear is that for equivalent capacity DRAM is much more expensive than an SSD.

My guess is that if no one is making a product like what you are asking about it's because it offers no real advantage over the much cheaper solution of adding another SSD.


👤 KVFinn
PCIE RAM that looks like a disk would be useful for running Llama and other but models, on systems that cap out at 128 GB max. Using FlexGen or other disk offloading... Interesting idea.

👤 vinay_ys
I did this a decade ago when ram density wasn't great and memory channels were limiting. Since then, the performance gap between actual ram and anything over sata has only widened. These days, ram density is much better and you also have persistent memory technologies like Intel Apache Pass that give you so much more density on DDR4 channels with latency tradeoff.

> how does it fare with regards to performance?

What's your use case?


👤 oso2k
It would be a bad idea today to use RAM as a SATA drive. NVMe is much more performant. SAS is available in 12G and 24G. Better would be to utilize DDR3 or better as an NVMe drive or even birfurcated NVMe device. The RAM drive is a good idea too if you have spare RAM or DIMMs. Compressed ZRAM in Linux makes it even better.

👤 modzu
if im reading this right, you have extra ram that you dont have dimms for, so youre thinking of interfacing it via sata as a swap. the thing is, ram is much more valuable in a dimm slot, and sata (slow as it is) is much better suited for persistent non volatile storage. so your request is sort of like asking if anyone makes a part for your honda that you can pour jet fuel into but the part will just burn off the excess energy it doesnt need so it drives the same as with regular gas. i would trade the ram for a drive. but purely for fun, you might consider interfacing stuff through as many adapters and interfaces as you can, and make some cool glitch art.

👤 bick_nyers
CXL could be used in this way, if you are unfamiliar with the tech., ServeTheHome on YouTube has some good videos detailing it.

👤 skunkworker
I’ve seen drives like the Gigabyte GC-Ramdisk but never used them. But it accepts 4 sticks of ram into a PCIe card.

https://www.newegg.com/amp/gigabyte-gc-ramdisk-others/p/N82E...


👤 brudgers
Probably not because SSD's pretty much hit the boundaries of the engineering envelope.

The maximum bandwidth of a SATA interface is 6Gb/sec.

For comparison, old PC-1600 DDR RAM has a data rate of 1.6GB/sec...or >10Gb/sec because 1Gb != 1GB.

Over SATA, static RAM is good enough to saturate the interface and is non-volatile and cheaper.

Good luck.


👤 exabrial
Yes, there's plenty of devices like that, but they're slower than SSDs usually.

The best thing to do would just make a RAMDrive, but x86 systems are surprisingly craptastic with real world memory bandwidth and latency and I haven't found this solution to be mind-blowing.

On ARM it might be a different story.


👤 gigatexal
https://habr.com/en/post/569780/ The way we made an external PCIe RAM disk based on the DDR memory

👤 smoldesu
I'm not sure if one exists, but I think running it over SATA would defeat the purpose of using a RAM disk in the first place. Can I ask why you wouldn't use a SATA SSD instead?

👤 tinus_hn
Why would you do this? A modern ssd outperforms the SATA interface.

👤 walterbell
Epyc Embedded (512GB) and Xeon-D (384GB) can be used for "desktop" systems that need lots of RAM.