5

I know there was a somewhat similar question before: How to share CPU or RAM?

But, let me just specify it a little more...

When Microsoft Windows requires more RAM capacity than available it uses a swap-file to temporarily store the data there, this is actually something like a hard-drive-based RAM. This technology is used for many years.

Theoretically, it shouldn't be too hard to implement a similar technology that uses the RAM of different computer(s) in the network for temporary data storage. This just requires a software that runs on computers in the network that accepts and returns data from/to the main computer and keep that data in the RAM; plus the operation system of the main computer must have the ability to use computers in the network instead of (or in addition to) the swap-file.

I wonder, are there any implementations of this idea? This would allow users to build RAM clusters using all of their home or office computers, that will boost the performance of a single computer for some development/gaming/video tasks, etc.

2
  • In addition to the great answers below, any shared memory solution would probably be way more expensive than just buying more RAM.
    – MetaNova
    Oct 19, 2013 at 15:01
  • Back when 64-bit was less common, people would buy RAM drives on a PCI card then put their pagefile.sys on it due to the 32-bit RAM barrier of 4GB.
    – Sun
    Nov 7, 2014 at 16:36

3 Answers 3

5

Actually, it would work only in a very few cases (certainly not gaming!) even if it was possible.

The first step is to export a raw device protocol, since Windows employs direct access for faster swapping operations. Currently this can't be done as there is no raw device protocol for Windows (there is on Linux and some Unices, and perhaps iSCSI could do).

Then you'd need to import the device on the client machine as a physical device. This too can be done, but for safety reasons most implementations treat network devices as removable devices. One might be able to do this by tweaking ReadyBoost technology, though.

But the problem now is that a network device is orders of magnitude slower than a physical disk device (which is orders of magnitude slower than memory), so you wouldn't be able to swap too much on it without the system grinding to a standstill.

You could use this only if your speedy RAM requirements were low and your mass storage requirements were huge and tolerant of very slow speeds. And it would be only worthwhile if you had this on several computers. Which means you've built a computing cluster... and this means you've a problem of distributed computing (which has its own set of tools and is usually approached by offloading whole processes with all their memory to other nodes).

In ordinary usage, if a larger disk swapfile won't help you because it's too slow and thrashing kills your performances, how could an even slower network drive solve anything?

Scenarios

This would allow users to build RAM clusters using all of their home or office computers, that will boost the performance of a single computer for some development/gaming/video tasks, etc.

For video processing there is the possibility of offloading tasks in parallel to client computers, each of them operating on a block of video frames or different channels. There is active research on that. The trick is all the clients having fast access to mass storage (which could also be distributed: there are also network distributed file systems in which files may reside on more than one physical server), each working to CPU-bound tasks.

For development, there are tools such as dmake that allow partitioning a project build (and static analyze, test, and document...) to different hosts. This can be also done automatically with continuous make systems and automated build, and the results are possibly much better than doing everything on demand from a single command host.

2

Those technologies exist, but they're so complex and expensive, that one would usually not use them for development, video games or video editing, because it's just easier and cheaper to buy a single powerful machine. They also increase memory access latency by at least one order of magnitude even with specialised high-throughput low-latency networks like InfiniBand.

On the other hand, distributed shared memory systems are quite common in super computing. Those usually come with a memory manager and programs that try to keep their portion of memory coherent and local as to not access remote memory regions too often.

-3

I have thought about this question but in a little different way. What about a RAMDisk shared between two computers. The RJ45 is still faster than an SSD over an SATA III connection. Surely, not as fast as native RAM, but with a crossover cable, one can move their virtual memory across to a RAMDisk. This method would still stomp an internal HDD, SSHD, and an SSD. This idea may be a good gaming trick between two PCs when one PC has much less RAM. The idea is to share the RAMDisk then set-up the guest PC to save virtual memory to the host's extra RAM.

3
  • Only 10Gb/s Ethernet is faster than SATA 6Gb/s (aka SATA3). However, it introduces prohibitive amounts of latency, and that's without any protocol.
    – Daniel B
    Apr 29, 2016 at 22:22
  • Thanks for the feedback Daniel. That idea was just a theory I had today. I aim to test soon. My friend is making me a crossover cable tonight. Apr 29, 2016 at 22:38
  • 1
    No need, all modern network interfaces have auto-crossover.
    – Daniel B
    Apr 30, 2016 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .