1

So, one of the differences between "main memory" and disk storage is durability -- the data on hard disks will stay accessible and unaffected even if the host machine crashes or loses power. One can also use distributed systems which replicate the data across many servers, and from what I can tell, on sufficiently fast networks, it is common for serving data from a remote machine's RAM to be faster than reading data from a local disk. So one wonders whether a distributed system of machines storing their data in RAM could actually be faster than disk for both reads and writes, while offering similar durability, so long as there are enough replicas. Some questions about this:

  • Could one ever obtain similar durability to a hard disk using a system of distributed machines storing the data in RAM?

  • Would one possibly see performance benefits by just querying data from this system rather than storing data on a local disk? (Obviously, network partitions are an issue if we wish to be consistent at all.)

  • Has this approach to persistence been considered before, and is it practical at all?

  • Make sure to distribute your servers across multiple physical locations. It'd be a bummer if they were all in the same server rack & the power was lost. – Dan Pichelman Aug 17 '15 at 23:54
  • 3
    a roundtrip over network is slower than roundtrip to the local disk especially when congested. Also data density of a magnetic platter is higher than DRAM. – ratchet freak Aug 18 '15 at 0:17
  • 1
    While not using RAM over network, which is slow, there are insanely expensive machines out there that use RAM to temporarily store data when it is collected faster than can be written to disk, which is a situation usually encountered in scientific endeavors. Check out en.wikipedia.org/wiki/Worldwide_LHC_Computing_Grid – whatsisname Aug 18 '15 at 2:40
  • You can expect any durability or performance from a system which still has to be invented/created, assumed you have enough money and enough time to wait for technical progress. Your question will only make sense when you restrict the time., for example, to the next 2, 5 or 10 years, and the costs (for example: local storage vs. network storage for the same price). And even then, any answer will be highly speculcative. – Doc Brown Aug 18 '15 at 10:49
  • I think you'd be better off with a RAID array of SSDs, unless you're working with Infiniband or some other insanely fast network. And once you start dispersing your network, latency creeps in and will kick your throughput in the gnuts. – TMN Aug 18 '15 at 16:21
1

It all comes down to the cost of fast memory.

When you consider how expensive is the RAM, it starts making sense to use it for a small amount of data you need right now, and keep everything else you don't need that much on a cheaper medium. Often, there are even more levels than that:

  • RAM for a small subset of data you need to read as fast as possible,
  • Local SSD for a larger subset of data you would like to be able to read fast enough,
  • Local hard disks, directly attached storage or NAS for the data you may need to read in a reasonable time,
  • Tapes for data you are expected to read only in exceptional circumstances.

This applies equally well to home PCs, data closets, even cloud storage. Compare the price of a AWS server with a hundred gigabytes of RAM with a hundred gigabytes of S3 storage and a hundred gigabytes of Glacier storage. If you want S3 reliability but at a speed of a local RAM, you should expect the price to be accordingly high.

The good thing is that there are specific patterns which are designed to work with this topology (i.e. small but hugely fast non-persistent data medium combined with increasingly large, persistent, slower mediums). Cache is one of them: instead of having to juggle with data, trying to guess which one should be put in RAM, you simply delegate this job to a caching solution, picking the right caching approach. And when it comes to caching approaches, you have a large choice.

Aside the cases handled by proper caching, there are situations where you need high speed access to perform a task (an example which comes to mind is the restoration of a SVN repository from a backup, which is extremely dependent on the speed of storage medium). In most of those situations, persistent aspect is welcome, but not required: for instance, if the server restarts while I was recovering a SVN repository, I can always do the operation again (or do it in parallel on multiple servers if it's worth the money).

Finally, there are situations (scientific analysis, statistical data processing) where it would be great to have huge amounts of very fast data mediums. Persistent aspect is usually irrelevant in those cases (with map reduce, you just redo the job of a machine which terminated unexpectedly), and huge costs of any fast medium usually force to fallback to ordinary SAN solutions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.