Methods to increase performance of Qubes

I’m using a 2.2 GHz 4-core i5, 16 GB RAM, and a 560 GB/s SSD.
Which method will increase the performance of Qubes more - replacing the CPU, increasing the RAM to 32 GB or replacing the SSD with NVMe?

1 Like

All of the above.

5 Likes

It’s a good joke :grinning:
But my question was different: or - or - or.
This means prioritizing the methods, which of them will give the greatest performance effect.

1 Like

How about this :

…but each in its own way…

… depending on how you use it, and what you find to be performing badly.

[insert appropriate emoji here]

1 Like

Oh yes… also, how much each will cost.

1 Like

If i would ask such question, my first choice would be “More RAM”. Until 64 GB the speed increase is near proportional. Second choice will be an SSD, but only, if it replaces a mechanical HDD. Replacing the CPU would be my last choice, because the speed increase is only small (if the CPU family is not fundamental newer).

3 Likes

Just like murdock said, with some details:

  • More RAM will allows you to run more VMs (Qubes) simultaneously. So this is not really a performance, but usability metric. And I can confirm, that usually this is the bottleneck in most of the Qubes workstations I have seen. And if you have only 16 Gb, then increasing this would have the most visible effect in practice.

  • a faster SSD (more IOPS) would increase the speed of spinnig up new VMs, running applications, basically everything. However, if you already have an SSD, then the difference is might be not as big as the marketing numbers would suggest. - And SSD ‘speed’ is surely depends on the actual SSD model, and your CPU, and your motherboard too.

  • a faster CPU theoretically increases processing power - but this is usually not a bottleneck, means increasing this metric will usually not result in any visible performance gain. For example: because your CPU will just wait for the disk operations of your ‘slow’ disk.

1 Like

Thank you so much for these valuable observations :beer:
Up to this point, I believed that increasing the SSD speed of 560 MB/s to NVMe to 6400 MB/s (more than 10 times) would give the greatest performance effect of Qubes.
So I was wrong? :confused:

1 Like

Well, that’s depends. As I mentioned:

given you mentioned that ‘6400 MB/s’ That is sound to be a PCIe Gen 4.x device… but do your motherboard and CPU even support that? - I can’t tell unless you provide me your details.
(but I guess, that you might be able to reach 2x reading speeds in practice)

Also worth mentioning that number is a theorethical maximum of that device. And in practice you will use it mostly for random read operations, where the IOPS is much more important metric than the maximum write/read speed.

Then, very important questions:

  • How do you currently ‘feel’ about the performance of your machine?
  • How many VMs are you running simultaneously?

So If you are not limited by your RAM, then you might better with the new SSD - only you can decide.

1 Like

I’m still a beginner and I’m just getting used to Qubes, so I only run 1 or 2 virtual machines.

Of course, the performance Qubes is noticeably lower than that of a regular Debian, which is why these questions of mine arose.

I demonstrate the real speed of the Nvme on my other computer using the KDiskMark utility:

Now I’ll try to demonstrate to you the speed of a regular SSD on Qubes, but I’m not sure how to install this utility correctly here,
probably, should it be set to Dom0?

1 Like

I do not know how to install KDM in Dom0.
Therefore, I measured the speed in Personal Dom

Speed SSD PATRIOT 128GB on Personal Dom :

What do you think about these different speeds?

1 Like

Under these conditions, Qubes takes 19 seconds to load and Firefox takes 11 seconds.
That seems pretty long to me :thinking:

1 Like

Getting a faster drive is going to improve your load speed

Here is the KDisk stats from my drive, PCIe 5.0 x4

If you want the biggest performance boost, get a 4.0 or 5.0 x4 NVMe drive and 64 GB memory.

With 64 GB memory, you can load most of your often used qubes when you boot, not having to wait for qubes to load makes Qubes OS feel very close to running traditional Linux.

I have 5 different browser qubes preloaded, opening a browser when the qube is running takes ~1 sec, and disposables takes ~5 sec.

2 Likes

You have super speed! :+1: :grinning:

Unfortunately, I can’t afford to buy all the high-speed devices at once.
First, I’ll increase the RAM to 32 GB.

1 Like

Hmm, as ZRuby says. If you replace a spinning HDD with a SSD, it will have a great effect in overall speed of the system.
But 16GB RAM are (for my feeling) to low for a seriously usage of Qubes OS. Sure, it runs, but you will not like that user experience.
Please consider also, that, as in almost every OS, RAM will be used as buffer, if it is not used for applications.
So i feel (but i dont have measured that), that an Qube with 8GB usable RAM will react faster than a VM with 2 or 4 GB, even, if the application itself uses only a part of that memory.
And if you use the standard setup of Qubes OS, you have 4 sys Qubes running in background (sys-net, sys-firewall, sys-usb and sys-whonix). Additionally your 1 or 2 VMs with applications.
That are alread 5 or 6 running VMs in standard setup plus dom0 (that uses some RAM also).
So i guess, your choice should be between RAM und SSD (but the last only, if you replace a spinning HDD with a much more faster SSD). It really depends on your usage scenario.

1 Like

Ok, for now I can only increase the RAM to 32 GB, the motherboard does not allow more increase.
If this is not enough for comfortable performance Qubes, after some time I will change the SSD to rapid NVMe.
This is all that the old motherboard with PCI-E 3.0 will allow

1 Like

For me, doing upgrades has rarely given much of a performance increase but a newer machine has. There are other factors than those you listed. Upgrading from ssd to nvme on pci 5 makes a lot more sense than pci 3.

1 Like

On this machine I have 16GB RAM, running 18 qubes atm on KDE. User
experience is fine.
Many ways to help out with allocations - reduce amount set for dom0 in
Xen parameters, tune memory allocations for many qubes, use mirage
firewall where possible, etc etc. Many of these have been discussed in
the past.
Every one will have different ideas on what can be done, depending on
their use case, but in ordinary use disk speed is far more important
than RAM imo.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

Well upgrading the CPU would increase the performance the most. More ram would allow you to have more qubes open at once, and using an M.2 PCIe 5.0 SSD would make all file related operations faster as well as have the system to boot quicker.

1 Like