Can multiple SSDs with RAID or something like Texas Memory Systems' storage solutions be used as system memory?
-
What Robert says, but if you write your application to actively use "modern" OS features like mmap() to fake unlimited memory and let the OS deal with loading and unloading your data. – Alex Holst Dec 12 '10 at 21:20
-
1Some people put their swap on FusionIO cards, and it's really, freakin, fast. :) – SpacemanSpiff Dec 13 '10 at 00:26
5 Answers
No. RAM is RAM and disk is disk. They're different classes of device, used in fundamentally different ways by the system.

- 31,884
- 6
- 58
- 89
-
+1, There's also an order of magnitude of difference in the performance. DDR3-2100 ~ 17GB/s; "High End" SSD ~ 300MB. RevoDrives are up to 1.4GB/s, still more than 10x slower. – Chris S Dec 12 '10 at 21:18
-
For all intensive purposes this is the correct answer as swap has its own set of rules used by the OS and is treated drastically differently than physical memory. Read the OS avoids using it and in the use case of say an NFS share you would want it to use swap if the swap were on an SSD. – Damon Jan 25 '17 at 22:02
As Seymour Cray said about virtual memory: "Memory, like orgasms, is better when you don't have to fake it."
So, you could make a swap partition on one or more SSDs and pretend like you have more RAM than you do. Realize that SSD average access time is around 100ns and RAM is more like 10ns, so it will be slower. Also realize that MLC SSD in particular is not optimized for writes, and it can't really keep up with heavy write loads and will have to pause while new blocks are erased for use. SLC SSDs are better about this, but still aren't really as fast as DRAM.
But worst is that things stored in swap can't be acted on directly. They have to be copied into RAM, probably after first copying something else out. So that average access time is multiplied because of this.
Depending on how random your memory access is, this may or may not result in a usable system for your needs.
So, the short answer is: Yes, it kind of can be used as system memory, but only badly.

- 10,720
- 3
- 25
- 28
While there is most certainly a way to accomplish this, there are other factors to consider if you plan on doing so, such as latency and access times, they are still quite inferior to system ram.

- 235
- 1
- 2
- 8
I've seen an Intel presentation that was talking about using fast Flash as a kind of slow system memory. That talk was about current usage of flash as a tier1 storage or a cache (think ZFS) for slow and large disks. Imagine a (deep) memory hierarchy with L1 -> L2 -> L3 -> DRAM -> fast flash -> "slow" flash -> rotating media. No dates or product names were mentioned.

- 5,700
- 24
- 36
-
I wish I could up vote this more as this use case would be amazing to implement. This would be the simplest way to implement file caching as long as you cached a high enough percentage of files;that is size of the cache has to be big enough and being short would be detrimental to the write endurance of any device. Still hunting for how to do this but people get shot down pretty hard for even bringing up mapping system memory to an SSD no matter the reason. – Damon Jan 25 '17 at 21:59
As many have said, latency, access times and read/write times will be slower, but I guess you could oblige a program to access disk and not RAM. Swap partitions on Linux are used as a mixed solution: once there's no more RAM memory on our systems, memory pages are exchanged on this area (from RAM to disk and viceversa) so programs can access faster the pages they're really accessing.
There's another interesting point here: while you can't make an SSD disk behave as main memory, you can do the opposite. Utilities such as RAMDisk (From DataRAM, http://memory.dataram.com/products-and-services/software/ramdisk?) can be used to transform part of your memory on a super-fast disk partition. You can use these utilities to accelerate some applications (such browsers, http://downloadsquad.switched.com/2010/11/10/how-to-move-the-firefox-or-chrome-cache-to-a-ram-disk-and-speed/).
Regarding your main question again, I really can't see what would you need this for. Memory is quite cheap these days, and you can set up a system with lots of RAM easily.

- 1,332
- 3
- 23
- 38