My experience with swapiness (on non-Qubes): When having high swapiness, it 
uses swap more than actually needed, sligtly slowing the system down. OTOH, 
when having swapiness=0, it runs smoothly until RAM limit is reached. Then, it 
suddenly freezes for few minutes.

Qubes doesn't look like designed to be good at properly using swap. Unless you 
have enough RAM to run almost without swap, you are going to have various 
issues, including non-ability to start a new VM. So, I it makes sense to have 
enough RAM with swaps used as rarely as possible (i.e. swapiness=0). I don't 
recommend not having swap at all, because this can lead to frequent OOMs, 
especially of X11. I remember having some X11 crashes when not having swap, and 
they were more than rare.

Things might have changes, but as far as I remember, Qubes memory balancing 
works like this:

memory_required = ram_used + swap_used
k = 1.3
memory_assigned = k * memory_required

This is one of reasons why Qubes is not good at excessive swapping* and why 
swapiness > 0 in domU does not make much sense: When you move something to 
swap, Qubes still tries to assign RAM for it. AFAIR, the argument for this 
behavior was that qmemman has some latencies, so when system needs more RAM, it 
might be too late to request it.

On one hand, I believe this system could be improved to require less RAM. On 
the other hand, even a simple modification in the formula would require 
non-trivial testing under various load. If someone wants to offer a 
modification and research about it, I can elaborate my ideas (handling swap 
separately and adding some caps), but I am not going to spend all the time 
required for testing and fine-tuning constants.

*) Well, no system works good at excessive swapping, but some systems are less 
bad at it.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/1ad37cac-6b6d-4ed2-b7ca-c52c5093eb16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to