Are there any discrepancies between the resources an OS uses when running in a virtual machine vs being ran directly?
I recently found out about a Linux Distro named Q4OS and I wanted to test out their claim that it only requires 256 MB of ram when using the trinity desktop environment. However, when I used the live cd in virt-manager with 256 MB or ram, it just kernel panicked at boot. So I then tried it with 512 MB of ram. In addition to some issues that are not present when you are using at least 1 GB of ram, such as "sudo apt update" causing the entire VM to become unresponsive, I noticed that it seemed to actually use anywhere between 290 MB to 370 MB of ram when the only thing running was the process viewer (which is htop).
Obviously, this is still very low for a modern Linux distro but I was wondering how accurate VMs are for testing ram usage.
And, yes I know that it would be pretty much useless on a PC that only had 256 MB of ram even if it did work. I'm actually checking the ram usage because there is a possibility that I may be using a very old computer of mine that only has 1 GB of ram at some point in the future. So I'm just testing it and eventually other distros out to to see which one I'm going to end up using (assuming I do actually end up even using that computer).
Edit: I just tried the 32-bit version in virt-manager and htop stated it was only using 232 MB of ram, which means that their claim was right and that I might have been using the wrong version.
Edit 2: I just tried installing the 64-bit version in virt-manager and htop stated that it was using about 350 MB of ram, so I don't know if installing it actually made a difference.
The install cd is probably just running Debian installer, and way more lightweight.
“Use the install-cd media for older 64bit as well as 32bit machines.” - probably applies to such low memory.
Also you should probably use the 32-bit cd. 64-bit binaries use more memory, and realistically anyone building with an Athlon 64 (2003) or newer was probably also installing more memory than that.
RIght, I forgot that 64-bit binaries use more ram. And seeing that the 64-bit version does work fine with 1 GB of ram, in the off chance that there is something that should work but requires a 64-bit OS, I would still have the option to use the 64-bit version.
There could also be differences in which hardware drivers are loaded and operating. In a VM, the graphical environment probably uses software rendering, which is also expected to take away some system memory of you didn't pass through a gpu, but maybe that's accounted differently.
To answer the question of discrepancies, yes. There are actually different types of virtualisation techniques that offer different levels of interaction between the VM and the hardware (negating the use of additional emulation and processing, etc.). Look up paravirtualisation.
On a somewhat unrelated note: I have an old Iomega arm board running an old version of Debian and OpenMediaVault, it only has 256 MB RAM, and only uses about 30% of that while streaming DLNA audio.
Linux can be super minimal
I was actually testing the trinity 64-bit version because it was the only version that had a live cd. I actually just downloaded the 32-bit version and I'm about to try it out.
Yes their benchmarks will have been on a normal system, installed on the disk. If it is the live USB, everything should be loaded to RAM (Clonezilla can run completely from RAM) so that you dont suffer from the USB bottleneck.
Why do you care about low RAM? This often means, that the system is very inefficient. If you cache stuff in RAM, your system gets faster and you save SDD read/writes, which increases its lifespan.
RAM lasts near forever. If you have more, the system should use more. If you use the system and run very intense programs, the system should adapt and use less. But if you are one of the dudes running Arch with 32GB of RAM, the system should cache everything it has.
If you only have 1 GB of RAM, you definitely need to use a 32 bit distro. Regardless of the WM or DE, 64 bit software is going to chew through that 1 GB fast.
I have been playing around with the Q4OS Trinity 32 bit and I had forgotten how much lighter 32 bit software is memory-wise. I have a full DE ( Trinity ), Firefox with a couple tabs, Thunar, LibreOffice Calc, GIMP, and Scribus all open and I am still only using 935 MB. Awesome.
It is certainly the lightest systemd based distro I have used.
There is definitely some software missing from the repos. I could not find dotnet or Visual Studio Code which I am sure are in 64 bit Debian. But Nala, Neovim, GCC, Clang, Rust, Go, and friends are all still there. Libmobiledevice connects to my iPhone just fine.
It even has Podman and Distrobox although none of the 64 bit images work of course.
Lxqt is in the Q4OS 32 bit distros. You could try that if you want but Trinity seems fine.
Note that many modern Desktops may only use as much RAM if they have as much.
Anyways, use LXQt, it is based on Qt6 now, will have Wayland support soon, and can be used with Wayfire or even tiling window managers, maybe even the one from COSMIC!
On their website, it states that the minimum requirements for the OS are 256 MB, that's what I was going off of. I even mentioned in my post that even if it was installable on a computer with 256 MB of ram that it would be pretty much useless.
Also, I just tested the 32-bit version and, like what another user stated, it does use less than 256 MB of ram, which means that their claim is right.
I use Bazzite, AFAIK Steam OS runs inside a container, the performance is amazing. I've read the same thing from people who do VFIO GPU passthrough to a Windows VM. If you use kernel based virtualization, there should be no difference.