15 ms·
Ask HN: 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?
- jaclaz 4y agoToday's thread: https://news.ycombinator.com/item?id=35195029 https://news.ycombinator.com/item?id=35195029 https://ddramdisk.store/ https://ddramdisk.store/
- smoldesu 4y agoI'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?
- simplotek 4y agoI have RAM sticks already lying around, so the cost per GB in this scenerio would be zero. Also, I presume that a SATA interface to store data in RAM might have better performance than the average SSD.
- smoldesu 4y agoIt would depend on the controller. Most SATA SSDs are already saturating the max throughput of the interface (~600mb/s iirc), so you might want to look for a PCI-based option instead. Even still, I have a hard time imagining the performance squaring up against a proper NVMe drive. I'm not trying to discourage you or anything, but I think paying $50 for an adapter to run 500gb of RAM slower than a $50 500gb NVMe drive is a bit of a goose chase. Good luck in your search regardless!
- universa1 4y agoTransfer speed is not everything, latency for random access is one important factor and also performance with randomly accessing many small files... Something even nvme drives are not that fast with...
- smoldesu 4y agoTrue! All of that would still depend on the way the memory is being accessed though, and if you really want to maximize the speed at-hand then you'd need a powerful memory controller. Once we get to this stage in the thought-experiment though, I think it makes more sense to install the RAM into a normal system and use a RAM disk to store things in it. It's an interesting question, but I think the circumstances explain why nobody has really commercialized something like this. NVMe will get you 90% of the way for 30% of the price, and it's non-volatile to boot.
- thfuran 4y agoBut nvme has lower latency than SATA. A ram disk over SATA just doesn't make sense.
- kkielhofner 4y agoRAM requires constant power. If you lose power, you lose data (more-or-less instantly). Not only would you need some kind of controller device to present the RAM as storage to the OS (abstracted NVMe, SATA, something), you would need to figure out how to supply absolutely consistent 100% power to the RAM modules. Such a device would need it's own battery, capacitor, something to continually power the RAM modules. This isn't without precedence - many hardware RAID/storage controllers have aggressive battery-backed caching to persist cache data in the event of power failure. I'm going to go out on a limb and say the approach you're considering is practically infeasible OR (best case) would need an oddball/bespoke device to pull this off. I'm not aware of such a device. Closest you could get is using tmpfs or similar on RAM in RAM slots but it kind of sounds like your existing RAM is electrically/physically incompatible with the system you're attempting this approach with.
- simplotek 4y ago> RAM requires constant power. If you lose power, you lose data (more-or-less instantly). It's perfectly fine for some uses, mine included. > I'm going to go out on a limb and say the approach you're considering is practically infeasible. To each his own, but I know for a fact that hardware RAM drives were indeed sold in the past, and after posting this Ask HN I've stumbled upon companies marketing them. https://ddramdisk.store/2023/01/19/the-ddr4-pcie-x8-lady-has-come-out/ https://ddramdisk.store/2023/01/19/the-ddr4-pcie-x8-lady-has...
- kkielhofner 4y agoYep, can definitely make sense for some applications but important to callout explicitly. Yes! I saw that device from elsewhere in the thread. Wondering when it will be available and what use will look like. Also curious about the battery backup and what maintenance looks like on that.
- alexvoda 4y agoModern SSDs far exceed the capabilities of SATA. That is why SSDs now use NVME with M.2 or U.3. There exist old slow PCI (DDR1 era) cards that do exactly what you expect: https://www.youtube.com/watch?v=bYbCYgYZVT8 https://www.youtube.com/watch?v=bYbCYgYZVT8 There are also some niche contemporary options: https://ddramdisk.store/2022/05/12/meet-the-latest-release/ https://ddramdisk.store/2022/05/12/meet-the-latest-release/ And in the future there will be very fast options: https://www.anandtech.com/show/16670/using-a-pcie-slot-to-install-dram-new-samsung-cxlmem-expansion-module https://www.anandtech.com/show/16670/using-a-pcie-slot-to-in...
- ianburrell 4y agoYou would be wrong about SATA being faster than SSD. Which is why fast SSDs use NVMe. Also, SSDs are much larger and cheaper than RAM. 1TB RAM is still expensive, 1TB SSD is $60. RAM storage has been tried before but was done as PCIe expansion card. It didn’t catch on cause of special drivers, but it only made sense back before NVMe and SSDs were expensive.
- simplotek 4y ago> You would be wrong about SATA being faster than SSD. SATA is the computer bus interface, while SSD is the generic name for a storage device that more often than not comes with SATA interfaces. SATA was not a hard requirement, just the one that I felt was the most popular. > Also, SSDs are much larger and cheaper than RAM. SSDs are not cheaper per GB if you already have RAM sticks lying around. Nevertheless this is besides the point, if the goal is to have low latency temp storage when you already maxed out on RAM.
- ianburrell 4y agoUnfortunately, NVMe SSD make RAM drives pointless. SSD, and any RAM drive, saturate SATA. NVMe make SSD perform well but won’t work for RAM drive since it is just a card. PCIe works, the old ones used it. The PCIe RAM drive cards were enterprise and super expensive. You could buy a whole computer for one. It is probably cheaper to sell the RAM sticks and buy SSD. As I mentioned, they are super cheap now and cache would only need small one. Also, setting up RAM drive is a pain. The old cards required special drivers; new ones could probably emulate NVMe. But setting up cache drive and getting programs to use it for temporary storage is annoying. All SSD is easier. There is a lot of experience with using SSD as durable write cache and not as much using disposable temp space. For those who need speed, buying more RAM is a better way of doing it. If you really need speed, then new computer with more RAM and NVMe is better approach. In any case, PCIe RAM drives aren’t made anymore. They were a niche at the time and now there is no market at all.
- KVFinn 4y agoPCIE 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.
- theandrewbailey 4y agoI 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 https://man7.org/linux/man-pages/man5/tmpfs.5.html Windows: https://sourceforge.net/projects/imdisk-toolkit/ https://sourceforge.net/projects/imdisk-toolkit/
- simplotek 4y ago> I recommend that you consider buying a lot of RAM, and using a RAM drive instead. That suggestion makes no sense. It's one thing to buy a SSD/PCI interface that allows you to plug in your RAM sticks. It's an entirely different thing to buy a brand new computer. Your suggestion is like "do you need more disk space? Just buy a new computer."
- MrGilbert 4y agoWhy would you need to buy a new computer, if you just need more RAM? ..unless, of course - you are blessed with one of the devices that have RAM soldered on. I cannot express how much I dislike these devices.
- simplotek 4y ago> Why would you need to buy a new computer, if you just need more RAM? No one presented such use case in this discussion.
- jeezfrk 4y agoadding ram to a motherboard is not possible without upgrading it, costing far more.
- brokenmachine 4y agoMotherboards have ram slots? Most have four and I'd say most people have two free.
- goosedragons 4y agoI 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 https://m.youtube.com/watch?v=bYbCYgYZVT8
- heelix 4y agoI think I had something similar, back in the DDR1 days. Mine was in a 5.25" format about the size of a CD-ROM. It was able to get closer to the SATA bandwidth max than anything I could afford with a RAID array of 10k drives. The IOPS were amazing, at the time. Had a battery backup and would cache to conventional disk. Was great for some DB operations.... with the understanding that it was not ECC ram and was a bit volitional. Main issue was the capacity. SSDs that came onto the market were a match for speed and PCIe drives crushed those I/O speeds again, without all the hassle.
- rasz 4y agoThere was also RamSan https://www.superssd.com/products/ramsan-400/ https://www.superssd.com/products/ramsan-400/ https://www.superssd.com/success/ccpgames.html https://www.superssd.com/success/ccpgames.html I/Os Per Second 400,000 Capacity 32-128 GB Bandwidth 3000 MB per second There is one "untested" on ebay at $800, 64GB model was $72K when new in 2007. Today comparable drive is something like "Verbatim 256GB Vi3000 PCIe Gen 3.0 X4 NVMe M.2 2280 Internal SSD" $38.89 with free shipping from Amazon.
- antisthenes 4y agoIt's absolutely mind-boggling that a tiny NVME M.2 drive can now easily match this performance.
- justsomehnguy 4y agoIdea 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 https://en.wikipedia.org/wiki/RAM_drive, under "Dedicated hardware RAM drives" [1] https://www.amazon.com/s?k=m.2+PCIe+converter+card https://www.amazon.com/s?k=m.2+PCIe+converter+card
- jaclaz 4y agoMore like 2014-2015, the Allone Cloud Disk: https://www.thessdreview.com/daily-news/latest-buzz/allone-cloud-disk-drive-101-reaches-half-mil-iops-computex-2015-update/ https://www.thessdreview.com/daily-news/latest-buzz/allone-c... ... not cheap ...
- justsomehnguy 4y agoOne off device by a company no longer traceable, with an outlandish price (as one comment pointed - they probably wanted a part of FusionIO pie) but only with a two slots for SO-DIMM? Dead from the start. If there was a (fulfilled) demand than there would be more devices like this, but... by 2012 the problem of a fast storage was solved by throwing loads of SSDs in some SAN (eg 3PAR 7xxx series) and of course enterprise sector preferred volatility and scalability, of which RAM-drives has none. Same with enthusiast market, WD Raptors[4] for a "fast" low/mid-tier, SSD for the fast tier. Just to be sure I checked when OCZ-VERTEX3, which is still running in T440 as a system drive, was anounced - it was ~Feb 2011. In 120Gb and 240Gb versions. It took some time to dig up the prices (I don't remember nor the prices nor the amount, heck, a decade ago): > The price of high-end 2GB DDR3 (double data rate, third generation) DRAM modules declined to US$25 in the first half of November, down 46 percent from its peak of US$46.50 in the first half of this year, according to DRAMeXchange. [0] Nov 2010 > G-Skill is offering a value DDR3 kit for $36 USD and Crucial sells their own value RAM for $34.99 over at Newegg. Considering a bit more than 3 years ago (Aprill 22, 2008 via the Way Back Machine’s snapshot of Newegg), a 4GB (2x2GB) kit of G-Skill DDR3 RAM went for $279.99, or about $560 for an equivalent amount of RAM today (8 GB 2×4 GB for $36 versus two 4 GB 2×2 GB kits for $560)! [1] Nov 2011 So even if you were somehow a visionary and would see the price drop a year or two before (ie ~2009)... at 2011 a single 8Gb stick was ~$50, so with $250 you could only get 32Gb (IF the RAM drive card was $50! and it wans't!), compared to $250 for 120Gb of Vertex 3. [2] Strange visionary who would see a DDR3 price drop, but not SSDs. I paid way less than $250 for that drive, because I bought it somewhere in 2012-2013: > Just ordered a OCZ Vertex 3 120GB after shipping, taxes and Rebate came to $87.00, ... [4] Apr 2012 [0] https://www.computerworld.com/article/2752016/dram-prices-to-keep-falling-through-the-first-half-of-2011.html https://www.computerworld.com/article/2752016/dram-prices-to... [1] https://pcper.com/2011/11/ddr3-ram-now-at-all-time-low-prices-becoming-extremely-affordable/ https://pcper.com/2011/11/ddr3-ram-now-at-all-time-low-price... [2] https://www.storagereview.com/review/ocz-vertex-3-review-240gb https://www.storagereview.com/review/ocz-vertex-3-review-240... [3] https://hardforum.com/threads/ocz-vertex-3-120-any-good-87-new.1688824/ https://hardforum.com/threads/ocz-vertex-3-120-any-good-87-n... [4] it's quite telling what the last models were announced in 2012 and then quietly disappeared a mere year later: https://forums.tomshardware.com/threads/1tb-velociraptors-discontinued.1386540/ https://forums.tomshardware.com/threads/1tb-velociraptors-di...
- vinay_ys 4y agoI 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?
- tinus_hn 4y agoWhy would you do this? A modern ssd outperforms the SATA interface.
- alexvoda 4y agoThere are many plausible reasons for this: 1. Someone already has maxed out their motherboard and has some unused sticks of ram and would like to repurpose them instead of selling them or worse recycling them (remember reuse is before recycle). Reuse as battery powered storage might be an option. (This is the use case of the OP) 2. Someone wants a faux-Optane cache, maybe for the paging file/swap. Maybe to avoid wear on the SSD. Theoretically it should be possible to get higher performance than a SSD (same era RAM is faster than Optane which is faster than same era SSDs), in practice IDK. Maybe Optane is no longer available, or again maybe they already have the RAM 2. Someone wants a Volatile drive, maybe to be used in conjunction with a security oriented Linux distro like QubesOS or Tails. If a switch is tripped, everything on the computer is truly gone.
- semi 4y ago> If a switch is tripped, everything on the computer is truly gone. Eventually at least. Ram loses its contents slowly, and temperature influences the rate it happens at, hence cold boot attacks where you can super-chill ram with some compressed air, move it out of a secured machine and into one you control, and extract in memory secrets.
- tinus_hn 4y agoA device that can do this would be more expensive than a ssd the size of any reasonable amount of memory someone would have laying around. I appreciate the idea as an interesting hacker experiment but it has no practical value.
- AtlasBarfed 4y agoWhat are good uses of DDR2 and their ilk? As new DDR gens come and go, there never seems to be any discussion on what to do with the old RAM, which is perfectly good. Elsewhere in the thread is a mention of gigabyte ramdisk, but what would be really interesting is a second bank you could have on a PCI card that could hold 8 sticks of RAM, and that RAM is considered lower-priority by the OS (use only if the main RAM is getting a bit constrained, or say "use this with the web browser". But I doubt such features exist even in the Linux kernel.
- walterbell 4y agoEpyc Embedded (512GB) and Xeon-D (384GB) can be used for "desktop" systems that need lots of RAM.
- skunkworker 4y agoI’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/N82E16815168001 https://www.newegg.com/amp/gigabyte-gc-ramdisk-others/p/N82E...
- gigatexal 4y agohttps://habr.com/en/post/569780/ https://habr.com/en/post/569780/ The way we made an external PCIe RAM disk based on the DDR memory
- johnklos 4y agoAges 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.
- thunderbong 4y agoI had (still have somewhere) one of these! Installation of Windows XP took 20 seconds! I was flabbergasted. Had to very sadly retire it when Windows 10 came along because their disk requirements increased. Now that I think about it, I should dig it out and load a lightweight Linux on it. Project for next weekend fixed!
- bick_nyers 4y agoCXL could be used in this way, if you are unfamiliar with the tech., ServeTheHome on YouTube has some good videos detailing it.
- modzu 4y agoif 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.
- tgflynn 4y agoWhat 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.
- traverseda 4y agoYou can get ECC DDR3 ram for less than $1 per GB, and it doesn't wear out like SSDs do. Makes a lot of sense for a cheap cache disk. I can totally see using a ram disc like that for a zfs/bcachefs cache with a modern CPU that doesn't accept DDR3. Might make more sense to use PCI than SATA though. A niche market, but I think there would be a market for ram drives like that, especially if they supported ECC memory. Lots of old server memory kicking around but if you want to actually use it your stuck with some abysmal CPU performance and a very high CPU power draw.
- tgflynn 4y ago$1 per GB is $1000 per TB. I just bought a 1TB SSD for about $70. With such a large price difference you'd be better off buying a new SSD every year or more often, if you're worried about it wearing out.
- derkades 4y agoAt that price it's probably QLC, which will be too slow for a busy cache and will probably die in less than a year.
- Dylan16807 4y agoNah, SSDs are going down nicely in price. You can get 1TB of TLC for less than $50.
- 4y ago
- brudgers 4y agoProbably 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.
- trillic 4y agoIf 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.
- exabrial 4y agoYes, 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.
- oso2k 4y agoIt 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.