17

Is it possible to put the entire operating system on a ram disk? If I have 16 GB of RAM and it is an Intel Xeon. I don't have an SSD and my hard drive is killing my boot time. So can I just allocate some of my ram to work as if it were an SSD and install windows and vital software on it, to gain super fast speed. Or is it more trouble then its worth and would be better off just buying an SSD?

10
  • 24
    Right... and what will you do when the power goes out or you need to turn the PC off?
    – misha256
    Commented Oct 12, 2015 at 2:40
  • They did make hardware ramdisks, but they generally arent worthwhile
    – Keltari
    Commented Oct 12, 2015 at 3:11
  • 1
    @Keltari Too true, they did make them, and then SSDs crashed the party. Folks who want even more performance than a single SSD can muster, simply RAID-up multiple SSDs at still far less cost than a hardware RAMDISK. There may still be esoteric scenarios where RAMDISKs make sense today. But the cost... the cost is just insane.
    – misha256
    Commented Oct 12, 2015 at 3:17
  • 8
    Remember that the file cache already copies the components which you actually use into RAM. Your Ram Disk idea would also copy unneeded parts into RAM, and duplicate the parts which are in use (as the Windows file cache in RAM would still cache the Ram Disk). So you'd end up with approximately 16 GB of Windows components in RAM which are either unused or duplicated, and need 32 GB in total. And that's on top of misha256's comment about power loss.
    – MSalters
    Commented Oct 12, 2015 at 9:10
  • 1
    @Ruslan exactly. In principle it could be faster because it would load data sequentially, but just letting the filecache do its job is better in practive. In windows SuperFetch should actively preload the stuff you need anyway. The toram option is mostly useful if you want to remove the CD.
    – gmatht
    Commented Oct 12, 2015 at 9:42

7 Answers 7

30

Your idea (as cool as it is) unfortunately won't work in practice:

  1. The RAM disk would be wiped whenever you turn your PC off, reboot it, or if you lose power.

  2. 16 GB is not enough RAM. Don't forget you need to keep some RAM aside to use as, you know, regular RAM. So at best you might be able to do a 12 GB RAM disk. Well, 12 GB doesn't meet Windows 10's minimum free hard drive space requirement.

  3. Software-based RAM disks actually run on top of an already installed operating system. What you'd need is a way to create a RAM disk at a hardware level, so that Windows actually thinks it's talking to a real IDE/SATA/SCSI hard drive. That would require purchasing a special RAM disk card (for example, this). Incidentally, this would also solve problems 1 and 2, but the cost is insane.

So yeah, you need an SSD ;-)

6
  • I'd imagine there might also be some problems with Windows rebooting during installation. That's if you get that far.
    – skeggse
    Commented Oct 12, 2015 at 5:51
  • 1
    I remember people copying Windows 95 to a ramdisk during the boot process. I guess it was possible because it booted on top of MS-DOS back then.
    – hmp
    Commented Oct 12, 2015 at 6:24
  • I ended up buying the WD Black 2 which is a 1 terabyte Solid state. Commented Oct 18, 2015 at 15:22
  • Windows has VHD to make tricks like that.
    – stiv
    Commented Jan 19, 2017 at 23:01
  • @MSalters "You don't need drivers to talk to RAM. " Not if you're treating the RAM as RAM, no. But if you want to treat a chunk of RAM as a disk, yes you do need a driver, one that looks like a disk driver at its upper edge. Commented Mar 25, 2017 at 6:15
5

Yes you can and 16G RAM are more than enough

  • Shrink the size of any windows iso using tools like ntlite or winreducer
  • Feed the output wim in to NtSetup
  • Boot the output VHD and configure your Windows - add firadisk driver
  • Mount the VHD from your normal OS and capture it with wimlib
  • Apply the output wim to a new VHD using the compact=lzx switch
  • Use grub4dos to map that VHD in RAM and boot it

That's a rough sketch of the procedure, it's a lot more complicated than it sounds but it can be done. I'm using a 1.2G Windows 10 VHD booted from RAM right now. Windows 10 support LZX compression on the fly. Windows 7 too but with the help of wofadk.sys.

If you're still interested ask for details.

1
3

You can use grub to create a ramdisk then load a vhd image into it and boot it.
Then you can save the image to disk before shutdown saving your work. It does indeed work with windows 10 and does have a point over sshd because it reduces the write cycles to the drive, and ram is much faster than sshd. Minimum size you can make windows 10 up and running is 3.9 g stripping everything out you do not need.

1
  • 1
    How do you get Windows 10 down to 3.9g? I really want to know.
    – Rolf
    Commented Mar 12, 2018 at 12:53
2

After booting, copy a directory to the ramdisk and use symbolic links to make that transparent to the OS.

But really, the OS already caches the disk using available ram.

No matter what, it won't help boot time, since the files are not copied to ram until after it boots, and you'll spend more time copying them.

The "live CD" of Linux systems often work using a ramdisk. But you wait for the compressed image to be read into ram, slowing boot time.

Compression...hmmm... if you have a fast Xeon but a slow disk, you could compress the drive and have less data to read from the disk.

Win10 should have fast-boot image caching though, so between that and defragmenting the disk your boot speed should be OK.

How slow is the boot speed you're complaining about?

1
  • I found out that my boot time was slow because my hard drive was wearing out. I ended up buying an SSD and it worked wonders. I guess my hard drive was really limiting my computers performance. Now everything is insanely fast. I installed windows and all my crtitical software directly on the SSD Commented Oct 18, 2015 at 15:39
2

Is it possible to put the entire operating system on a ram disk?

From some googling for "Windows bootable ramdisk" there are apparently ways to do it. I haven't tested them myself though.

You could also use a virtualisation platform to run a windows VM with a ramdrive as a backing store.

If I have 16 GB of RAM and it is an Intel Xeon.

16GB really isn't very much once you start talking installing software on ramdisks.

I don't have an SSD and my hard drive is killing my boot time. So can I just allocate some of my ram to work as if it were an SSD and install windows and vital software on it, to gain super fast speed.

The big problem here is that ramdisks are volatile. So even if you can get windows to run from a ramdrive and even if you have enough memory to run something that's not a crazy stripped down install, every time you do a cold boot you would have to re-copy stuff from your hard drive to the ram drive. If your goal is to reduce boot times that renders ramdrives fairly pointless.

Or is it more trouble then its worth and would be better off just buying an SSD?

Yes you would be much better off just buying a SSD.

1
  • "every time you do a cold boot you would have to re-copy stuff from your hard drive to the ram drive. If your goal is to reduce boot times that renders ramdrives fairly pointless." A ram disk has 0 seek time, so even when you copy everything at one go sequentially first the ramdisk might then be faster at providing the random files that are actually needed. Depends on how much time is lost seeking versus how much of the data is accessed during boot...
    – masterxilo
    Commented Nov 17, 2018 at 14:19
1

You could try getting a cheap SSD and Primocache. This software allows you to make a two tier caching system for any drive in your computer. The first tier usese the spare system ram, and the second tier uses an SSD.

The idea is that it writes changes to memory first, then to the ssd, and then when the system isn't busy, it writes the data to the actual slower drive.

30 day free trial http://www.romexsoftware.com/en-us/primo-cache/help.html

-1

What you are after is running from a physical disk made up from ram, is automatically stored on permanent media on power loss, and restored when powered on.

It isn't a new idea by anymeans. If you are willing to shell out the cash, it has been around for a while:

http://www.hyperossystems.co.uk/07042003/hardware.htm

You must log in to answer this question.

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