What Linux distros load entirely into RAM?

Status
Not open for further replies.

trawglodyte

New Member
Joined
Jan 27, 2024
Messages
26
Reaction score
13
Credits
418
EDIT - This is not about liveUSB's. Although, you can use them and make saves (i.e.-write to disk) if you want. This is more about frugal install or typical file directory install which loads to RAM and also saves (writes to disk), and the options for how and when you do that.

Hello, I've been learning/experimenting with Puppy Linux which loads partially into RAM. I think there were some experiments done to make it load entirely, but not sure how well developed. There are many, many different Puppy Linux and related distros. I've heard of Knoppix (but it looks like last release was 2021), and I am going to take another look at Porteus. Are there others? Can you hack regular Linux distros to make them load into RAM?
 
Last edited:


I used Google and found this...

Also this...
https://embeddedinventor.com/top-5-linux-distros-that-runs-entirely-from-ram-comparison-analysis/

It's not something I'd want to do but to each his/her own.

m1213.gif
 
Last edited:
Any distribution that has a option to try it out in a live environment so where you can boot from a live iso.
 
In Tiny Core, the "copy2fs" option allows either specified extensions or all extensions to be loaded into RAM instead of mounted. If all extensions are loaded with copy2fs, then the boot device can be unmounted / removed whereas if any extensions are mounted (the usual method of loading them) then the device containing the extensions (usually the boot device) must remain mounted.

In addition to allowing removal of the boot device, loading everything into RAM speeds up the system but, of course, at the cost of tying up some RAM - possibly a lot of RAM, depending on what extensions you are loading.

(much the way the video in reply #4 above describes)
 
In times of nvme devices it makes only sense for security purposes i think nvmes are currently mostly as fast as direct ram.
Well, that's the thing. RAM is still way faster. My gen3 machine I upped from 550 mb/s 2.5" SSD to 3,000mb/s+ nvme, (gen 4 nvme is 7,000mb/s+). But look at RAM speed by comparison.

DDR4 data transfer rates:​


DDR4 2133: 17,000mb/s
DDR4 2400: 19,200mb/s
DDR4 2666: 21,300mb/s
DDR4 3200: 25,600mb/s

DDR5 data transfer rates: (from 2020)​


DDR5 4800: 38,400mb/s
DDR5 5200: 43,200mb/s
DDR5 6000 48,000mb/s
DDR5 6400: 51,200mb/s
DDR5 7000 56,000mb/s

Besides speed, the other thing I find interesting about it is the option to save (write changes to disk) or not. Not gonna lie, I screw stuff up in Linux quite often. If those screw ups are in RAM and I can reboot without saving, and then boot back in as it was before I started, that is a good option. I'm not sure if all of the ones mentioned in this thread work that way. It's possible they load into RAM, but also write changes to disk as you work.

What I think would be cool would be a full-featured Linux OS that you could add 1/2 dozen or so apps to and still load into 16G of RAM. Possibly with the main file folders in ~/home mounted to a different partition. That way all your Documents, Downloads,etc... would not load into RAM, and when you put things there it does write to disk as you go. But all other changes stay in RAM until you choose to save. And all your apps launch as quickly as possible every time you click one, etc... Maybe this goes without saying, but Linux CAN do this while Windows/Mac don't have a chance. All they can do is keep writing more software to try to intelligently determine what apps you are most likely to use and preload those into RAM.

Or an even more full-featured, heavier version (maybe with A/V production apps added or something) designed for 32G RAM. I used to have the mindset of "saving RAM", that it's somehow wasteful to put a program or something in RAM that you don't immediately need. Well, if you are very limited in RAM that is true. But now I think if you have 16G or 32G of RAM and you never use more than 4G of it, THAT is wasteful. It's like having a 4 bedroom house and only using one. You should turn the others into an office, a pool room, storage, something. You have it, you should use it.

Well, you all have given me many to look into!! Thank you.
 
Last edited:
Almost any "Live" distro does this. Insert the USB stick and away you go.
Of course the initial loading from the USB stick will be much slower than NVME or RAM.
This will vary from computer to computer, in my case I have a 20GB/s usb-c port. but my thumb drive
only rated at 7GB/s ( USB 3.2)
With some distro's I can remove the USB stick once it's loaded. If you mean loading every single
binary into RAM, you could create a RAM disk. It's pretty easy to do.

The problem with everything being in RAM, is you can't save anything. None of your settings
will be persistent. No browser bookmarks, no downloaded documents, you will have to mount
some type of storage if you want to look at your pictures, or listen to your MP3's.

Unless you have a lot of RAM, it might not make sense. Lets say you have 16GB, and you're using
8GB as a RAM disk. That means you only have 8GB left over to run my applications in. Some distro's
such as AlmaLinux start out on a 12GB iso. So 8GB won't be enough, then you care about the latest and
greatest software and bug fixes and security fixes, you'll have to re-download those every single time you boot up.
That'll be much slower than your NVME drive. In my case, there's always something, some wi-fi driver or printer driver,
some applications that doesn't come on the USB drive ( those are typically bare-bones, just enough to get you started )
The live USB I installed from was only 2.5GB, but after running this distro for a couple of years, my system directories
are over 17GB. That's not counting my Virtual Image disks and all the stuff I have in my /home directory (currently
over 60GB)

I have 64GB, but I'm not a typical user that only uses 4GB at a time. I almost always have
20 browser tabs open. I am almost always running 3 or 4 VM's ( which I usually assign at least 8GB each )
I have IDE's open, and I'm using compiling something. I'm listening to MP3's to whole time. Then I'm on video
calls. I algo have 4 podman containers running a PHP/Postgresql stack.. I usually have word processor or spreadhseet open, sometimes a few at a time. I usually run MATE or KDE which are heavier than most desktops. Looking at "top" I'm currently using 24GB, but I have been over 40GB a number of times.
I'm in a band and we do multi-track recording. Sometimes 8 or ten tracks are in memory at once.

Typically it takes 1 second or so for me to open a browser or IDE. Maybe 3 or 4 seconds for a VM to start up.
Would it be faster in RAM? Probably but is 3 or 4 seconds worth all the extra hassle to make it work?
If there's a power outage, or a power supply failure, I just lost everything that wasn't stored somewhere.
 
Last edited:
Anti-x has an option if you use the fugal install to load entirely to ram.
 
@dos2unix Okay, there's a lot of bad information and flat-out wrong things in your post. There's many different options when it comes to loading into RAM and how and when you save. It's not the same as a liveUSB.

1. booting slower - not that noticeable on frugal installs I've worked with. Mostly Puppy Linux, but I do have a frugal install of MX Linux which loads entirely into RAM now. Even from a USB 3.0 w/ about 100 mb/s read speed it's really not a big deal. The WRITE speed is what gets you. The saves can take a bit, especially if you're doing it on a USB. Even USB 3.0's can have write speeds under 10mb/s and when you make a save it will take a few minutes. On a 3,000mb/s gen 3 nvme however the saves are a few seconds.

2. Yes, some distros don't make sense for this. The idea when specifying I have 32G of RAM was to point that out, and I'm also interested as proof of concept of what Linux might work for someone with 16G, that's what I'm trying to find out with my frugal install of MX Linux loading into RAM right now.

3. Re-download latest software - wrong. You can write the changes to disk any time you want, and frankly I think having the option to NOT write the changes to disk is fantastic. Just the other day upgrading the kernel went horribly wrong due to a bug that conflicts with NVIDIA. In a normal installation you have a mess, but with it loaded into RAM you just reboot without saving and that mess is gone. But if the upgrade goes well you just do a save and write it to disk, or save whenever you reboot or poweroff.

4. Yah, it's not for everyone. Especially your crazy ass with 1,000 apps going at once, 20 VM's, and A/V production. lol. Why are you even commenting here? That should have gone without saying that this is not the way for you. Did you seriously think someone was proposing you should try to load a massive OS into RAM and run a bunch of VM's while doing A/V production with 1,000 tabs open on 10 different browsers???!! LMAO. I don't keep a lot of apps going at once, but I do do a bit of A/V production and I don't know if this is even gonna be the OS for that. It might be that I won't put those apps and additional packages on this. Let's just get some browsers, office software and a few things first and see where we're at. I'm gonna get my conky going to monitor RAM use with a simple gauge and sort of figure out with this experimental MX Linux install exactly how much or little in terms of apps and so forth it wants to do.

5. The plan is to fstab folders ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos to a different partition. It turns out MX Linux has a nice GUI for that, but doing it manually isn't that hard either. I'm arguably in BETTER shape for a power outage than you are when it comes to saving files, and my files are also safe from a complete OS failure, your's aren't. Linux now has an experimental feature where you can fstab a folder on a partition which makes this an even better option. You should consider it even if you have a normal file directory install. Since you clearly care about keeping your files safe a lot.
 
Last edited:
I used Google and found this...

Nice finds, Bob :)

On the 2nd one (the linked article), just a note to The Viewers that DSL, referenced there as not being maintained, is now back in business.

Cheers

Wizard
 
When I boot to the live session (Linux Mint Cinnamon) it's running from Ram (volatile memory)...so anything I install will not be saved upon re-boot which stands to reason...doesn't matter how fast it is.

If I pull out the Flash Drive while in the live session...Mint won't work very well and that's excepted. I think some forget what the live session is actually used for.
m09002.gif
 
When I boot to the live session (Linux Mint Cinnamon) it's running from Ram (volatile memory)...so anything I install will not be saved upon re-boot which stands to reason...doesn't matter how fast it is.

If I pull out the Flash Drive while in the live session...Mint won't work very well and that's excepted. I think some forget what the live session is actually used for.
Well, we're talking about loading into RAM and being able to save, not how you use your live session of Mint.
 
Status
Not open for further replies.

Members online


Top