this post was submitted on 20 Aug 2024
43 points (95.7% liked)

Linux

47994 readers
1554 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Privacy benefits aside, does qubes run better than a typical vm like virtualbox? I tend to fiddle with distros a lot and I feel qubes might be a good choice, though I'm wondering about how efficient it is

top 24 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 2 months ago* (last edited 2 months ago) (1 children)

Xen, The backbone of qubes, is One of the very few microkernels that is widely deployed. It's extremely efficient. It only does the minimum amount of work necessary to dispatch resources to different virtual machine guests

So comparing a VM running on a dedicated microkernal hypervisor like qubes, compared to QEMU or KVM which requires a monolithic kernel, it's going to be much more efficient.

But, when you start talking about the full desktop experience, with a window manager and mice and keyboards, and a guest VM, and a VM to run the desktop, and a VM to run the USB for the mice and keyboard, and a VM for the network stack, and a VM for the firewall..... It's less efficient compared to a system running a single QEMU VM with a monolithic kernel, and everything handled with a traditional monolithic operating system.

It depends on your use case, what you want to optimize for, quite frankly if you don't care about segmentation and security qubes is probably going to be too much friction for you.

[–] [email protected] 4 points 2 months ago* (last edited 2 months ago) (2 children)

for me i will likely play some games or use proprietary apps in windows or something and swap back to linux. i also develop for linux sometimes so being able to swap distros quickly and with good efficiency while being able to share files easily would be nice.

i dont know how viable qubes is for this use case. i like the concept of privacy but i dont need 100% lockdown for each app.

i hate dual booting with a passion, and i also hate how much my base OS interferes with the operation of a virtualized os.

[–] [email protected] 10 points 2 months ago* (last edited 2 months ago) (1 children)

3d acceleration in qubes is very experimental. maybe not the best for gaming. You can do it, but your going to be elbows deep in virtio configurations

https://www.qubes-os.org/faq/#users

We do not provide GPU virtualization for Qubes. This is mostly a security decision, as implementing such a feature would most likely introduce a great deal of complexity into the GUI virtualization infrastructure. However, Qubes does allow for the use of accelerated graphics (e.g. OpenGL) in dom0’s Window Manager, so all the fancy desktop effects should still work. App qubes use a software-only (CPU-based) implementation of OpenGL, which may be good enough for basic games and applications.

For further discussion about the potential for GPU passthrough on Xen/Qubes, please see the following threads:

[–] [email protected] 4 points 2 months ago (1 children)

happen to know of any distros that dont have this limitation and operate similarly to qubes? i havent heard of anything i know its a longshot 🙃

but maybe i could work on programming and making this a bit smoother if i like the rest of what qubes offers

[–] [email protected] 8 points 2 months ago* (last edited 2 months ago) (1 children)

Qubes is unique

You could 100% play games on qubes if you have two graphics cards, or a integrated graphics on the CPU, and then have the GPU dedicated to a specific VM.

However, at that point, you might as well just use moonlight and sunshine and stream your game over the network.

Sunshine can run inside of a VM it just needs access to a GPU.

[–] [email protected] 2 points 2 months ago (1 children)

i do have integrated graphics and a gpu, though i dont know if the bios has one set to run independently or something

[–] [email protected] 3 points 2 months ago

Then you can game no problem.

Pass through the GPU to one VM.

[–] [email protected] 1 points 2 months ago (1 children)

You should use KVM for games

[–] [email protected] 1 points 2 months ago

yeah ive been considering it

[–] [email protected] 13 points 2 months ago (2 children)

It’s faster than virtualbox because there is lower recourse use from the base system and it uses qemu. Qemu/kvm is the fastest option for vms on Linux, but it isn’t exklusiv to qubes, you can also use it via the terminal on any distro or with a GUI like gnome boxes

[–] [email protected] 9 points 2 months ago (1 children)

It uses the Xen hypervisor, not qemu/KVM. Technically it is a Xen kernel virtualizing Linux since it is a type 1 hypervisor.

[–] [email protected] 4 points 2 months ago

Xen uses qemu for HVM guests afaik

[–] [email protected] 4 points 2 months ago (1 children)

Is there any info about how much the base system uses?

[–] [email protected] 5 points 2 months ago (1 children)

Not that I know, but you could spin up two VMs on your current system, one with Qubes and one with base fedora and compare the performance of vm’s

[–] [email protected] 4 points 2 months ago

yeah i was just wondering if there was a quick chart somewhere so i could be lazy

[–] [email protected] 4 points 2 months ago

Probably, yes. Qubes AppVMs don't run the whole DE inside it. Also, Qubes uses automatic memory balancing for VMs, so users doesn't need to care about it much.

https://www.qubes-os.org/doc/qmemman/

[–] [email protected] 3 points 2 months ago* (last edited 2 months ago)

KVM and virt-manager are faster than VirtualBox.

QubesOS uses a dedicated Hypervisor, Xen, which has this as its only job so I assume it is fast.

[–] rtxn 2 points 2 months ago (1 children)

What is a "typical VM"?

Qubes uses the type-1 Xen hypervisor that runs at a similar privilege to the kernel of other OSes. KVM is a type-1 hypervisor implemented as a Linux kernel module. VirtualBox is a type-2 hypervisor that runs in userspace. Of these three, Xen is the most performant hypervisor because virtualization is all it does.

If by "typical VM" you mean a guest OS running inside a window of the host OS, then Qubes will always come out on top because the graphics pipeline is much less of a bottleneck.

[–] [email protected] 2 points 2 months ago (1 children)

Qubes uses the type-1 Xen hypervisor that runs at a similar privilege to the kernel of other OSes. KVM is a type-1 hypervisor implemented as a Linux kernel module.

What tells them apart them? When would you use one vs the other?

Perhaps Xen for having all machines, including the one that controls the hypervisor, being virtualized, as opposed to KVM/QEMU running on the control bare-metal with VMs on top?

[–] rtxn 4 points 2 months ago

Basically, yes. Xen is a bespoke hypervisor. All it does, and all it can do, is run VMs. There is no host OS -- management is done through a privileged VM called dom0. KVM is a part of the Linux kernel. Virtualization is only one of its features. VMs run alongside, and are managed by, the host OS.

[–] [email protected] 1 points 2 months ago (3 children)

AFAIK it has very limited hardware support.

[–] [email protected] 8 points 2 months ago

It is not like 'very limited'. But generally they are focused around modern Intel CPU, and can have issues on new AMD CPU. And it won't work on very old CPUs without proper virtualization features.

https://www.qubes-os.org/hcl/ can hint on what Qubes will work better.

Also see the system requirements: https://www.qubes-os.org/doc/system-requirements/

[–] [email protected] 3 points 2 months ago

Are you referring to Qubes OS? If so, what do you mean exactly with hardware support?

[–] [email protected] 1 points 2 months ago

It's using Xen, it has amazing hardware support