Networking – Sharing RAM resources between 2 or more computers

clustermemorynetworkingswap

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.

Best Answer

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.

Related Question