On Monday, December 12, 2016 at 7:22:39 PM UTC+1, Chris Laprise wrote:
>
> Just wanted to note there are various warnings against using 
> swappiness=0 as it can result in killed processes; swappiness=1 is 
> considered the minimum value to avoid this problem. 
>
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-tunables.html
>  
> https://en.wikipedia.org/wiki/Swappiness 
>
> Chris 
>

Not nice. So, IIUC,
* we should have vm.swappiness=1 instead of vm.swappiness=0
* we should consider the (even tiny) swappiness in reasoning about the 
formula for required/assigned memory.

So, having enough memory that do not reach swappiness watermark requires 
multiplying the memory by 1/(1-swappiness/100). This might play well for 
swappiness=1 (factor 1.01, i.e. just 1% overhead), but it sounds strange 
(and counterproductive) for swappiness=50 (factor 2, i.e. 100% overhead).

So, when we have a memory requirements calculation function (In my previous 
post, I suggested f(req) = req + max(50, min(400, 0.3*req)) MiB, but I 
don't insist on this one), there are two variants:

a) Simple variant: Assume that there is no use case for large vm.swappiness 
in Qubes: f(usage_mem)/(1-swappiness/100)

b) Complex variant: Assume one might want higher swappiness, so add some 
upper limit: min(f(usage_mem+usage_swap), f(usage_mem)/(1-swappiness/100))

Does this sound reasonable?

Regards,
Vít Šesták 'v6ak'

-- 
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 qubes-devel+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-devel@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/fe518af9-d9cb-497e-aecc-7ae56e6fc9d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to