Running Operating System from memory

10

1

Assuming SSD's are extremely prone to faliure how economical would it be to load an OS into main memory and run it from there?

I can think I can deal with a few obvious drawbacks (I've survived inside the bounds of a 20gig VM for the last 2 years), but what are the pro's, con's, requirements and cost for running Windows 7 or the latest Fedora or Ubuntu distro strictly from RAM.

Just so there's no confusion, I'm not saying run the OS from a USB stick or live CD. I'm saying, start the computer, transfer the entire OS into memory from a external HD or 'the cloud' or a big memory stick and run it there. When the machine turns off, save the state to the external storage.

Peter Turner

Posted 2011-07-20T13:19:30.170

Reputation: 1 341

What constructive requirement am I missing here? – Peter Turner – 2011-07-20T13:36:28.273

I agree, Peter, I also reacted to the "-1". +1. – TFM – 2011-07-20T13:38:29.043

Just for info, this is exactly what FreeNAS 0.7 Embedded does, in order to minimise writes to the OS flash drive. – sblair – 2011-07-20T13:52:25.833

Boot Knoppix with the 'toram' option; wait for it to copy the CD to memory; ????; Profi-- Entire OS, applications, files, etc. running from memory. Downside: time it takes to read 700MB from a CD rom drive into memory. – Darth Android – 2011-07-20T14:36:55.527

This seems to be much more unsafe than using a SSD. Most SSDs seem to be very stable and have a long lifespan (with todays fast growing technology you don't want to use such a thing longer than 2-5 years anyway...). One problem for example with loading the system into the RAM would be that power loss means loosing you whole work-data. – Michael K – 2011-07-20T14:38:00.867

There are several *nix distros that already do this, although I don't know about Fedora or Ubuntu. Not that you couldn't develop one. They have a place and purpose, but they are still fairly specialized versions of the OS. A few that I've used recently include Puppy Linux, TinyCore Linux and FuguIta (OpenBSD). – Joe Internet – 2011-07-20T15:07:26.107

@Michael K, solid states are anything but stable. They have severely limited lifespans compared to conventional (read: hard drive) storage media, and will last nowhere near 5 years. Most people who go through the trouble to get SSDs usually run them out in less then a year, which is why I'm selling my Agility 3 (wanna buy it? :P) – Breakthrough – 2011-07-20T18:44:09.423

@Breakthrough, three of my colleagues are using SSD's in their home computer and the only problem they encounter, is that the SSD's loose speed over time. One of them is more than 3 years old and perfectly working; it slowed down a bit, but even with this slowdown, it is working fine (and faster than any HDD). The normal time of use for todays IT hardware is ~3 years, so this seems ok. – Michael K – 2011-07-20T19:20:55.217

Answers

8

Good question, but I think you're missing something - most of the operating system is already loaded into the system's memory on startup. Every programmer in the world knows what the slowdown/bottleneck is in a computer (the disk drive, regardless of it's type, for you non-programmers), so they all load as much as economically possible into the system RAM.

While it's certainly possible to do what you ask, there's really no point, since you have to load the OS from the storage drive on startup, and then re-write it back to the drive before shutting down. Also, once the operating system has been loaded, there's not much that needs to be retrieved from the storage drive (aside from certain system tasks and updates, etc...).

You would see better performance gains by using a RAM disk as a temporary storage area, or even placing entire applications onto the RAM disk and running them from there. What I'm trying to get at is, it's not the operating system that we truly need to run from a fast storage media - it's the applications that you have to load afterwards. Once most operating systems are loaded, there is not much disk access from the OS itself, but rather, the applications you use.

Breakthrough

Posted 2011-07-20T13:19:30.170

Reputation: 32 927

«there's really no point, since you have to load the OS from the storage drive on startup, and then re-write it back to the drive before shutting down»

What about network boot for OS images which should be reset on every boot? – Groosha – 2018-06-22T22:20:08.643

+1 for mentioning applications. More times than not, it's the applications that we use that are slow and not the OS. And there is little, if anything, the OS can do to speed up applications. Unless you turn Microsoft back into a monopoly. Which I favor. – surfasb – 2011-07-20T18:26:41.507

Applications often like to interact with the system drive (i.e., c:). Thus, it totally makes sense to have the OS in RAM. – Dmitri Nesteruk – 2014-03-14T09:44:41.057

1

just some ideas. not really well organised. but let's see how far we can go.

admittedly, with the current price of RAM, it becomes a very attractive option for us to run the whole OS from RAM and loading it from harddisk only in the startup (and writing it during shutdown journal-commit style).

the problem is that doing this particular thing is not easy, and given the estimated users that will do that, it will not be very economically sound for software/OS manufacturers/developers to do that.

however for linux it may be an option and one can try to specify the amount of ram available and make a tailor-made OS for it. e.g. 4gb ram edition/8gb ram edition/16gb ram edition, in which 2gb/4gb/12gb are used to load files from the harddisk... etc.

bubu

Posted 2011-07-20T13:19:30.170

Reputation: 9 283