On Wed, Feb 6, 2019 at 4:46 PM Marek Marczykowski-Górecki
<[email protected]> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Wed, Feb 06, 2019 at 07:38:19AM -0800, Marcus Linsner wrote:
> > I have an AppVM with
> > Initial Memory: 2400 MB
> > Max memory 24000 MB
> > [v] Include in memory balancing
> >
> > has no swap enabled (swapon reports nothing) and uses an official 
> > kernel(eg. not compiled by me):
>
> Lack of swap may be an issue here. Qmemman needs some time to assign
> more RAM (*) and this is the reason why VMs in Qubes have swap by
> default enabled.
> If you need a lot of RAM allocated quickly (for example it applies for
> Android build), better assign it initially and disable memory balancing
> for this VM.
>
> (*) Actually there are two parts of this: first detecting that qube
> needs more RAM - it is reported with 10Hz frequency, as a trade-off
> between allocation speed and system load caused by qmemman itself.
> Secondly, it needs some time to actually get this memory, potentially
> reclaiming it from other qubes first.
>
Impressive and much appreciated answer! <3

I'm now able to always reproduce the disk thrashing(disk reading only,
no writing) that happens before OOM-killer even triggers (in the case
with no swap), with:

[user@dev01-w-s-f-fdr28 ~]$ timeout=10s threads=1 alloc="$(awk
'/MemAvailable/{printf "%d\n", $2 + 4000;}' < /proc/meminfo)"; echo
"Will alloc: $alloc kB for each of the $threads concurrent threads.";
echo "MemTotal before: $(awk '/MemTotal/{printf "%d kB\n", $2;}' <
/proc/meminfo)";time stress --vm-bytes "${alloc}k" --vm-keep -m
$threads --timeout $timeout ; echo "exit code: $?" ; awk
'/MemTotal/{printf "MemTotal afterwards: %d kB\n", $2;}' <
/proc/meminfo
Will alloc: 13510504 kB for each of the 1 concurrent threads.
MemTotal before: 14002196 kB
stress: info: [2191] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd
stress: info: [2191] successful run completed in 10s

real    0m10.268s
user    0m7.528s
sys    0m2.664s
exit code: 0
MemTotal afterwards: 14002196 kB

of course this is a kernel issue due to "Active(file)" (seen in
/proc/meminfo) being evicted and re-read for continuing the execution
of the active processes that are still running on the system...

I'm going to attempt to find a way(ie. kernel patch) to keep a minimum
"Active(file)" in order to avoid disk thrashing(and thus allow
OOM-Killer to trigger), as suggested to me by Mikko Rantalainen in the
comment of https://stackoverflow.com/q/52067753
but wish me luck, since I r no programmah :) ie. any hints are more than welcome

Cheers!

> - --
> Best Regards,
> Marek Marczykowski-Górecki
> Invisible Things Lab
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> -----BEGIN PGP SIGNATURE-----
>
> iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlxbAVgACgkQ24/THMrX
> 1ywz+Af+Ptpbd2wooVH9Knxd+DAzIAanX/wLwenKDwXc+WNIB5DdY8V4jMBgj2Fg
> UDxJGQYgUT4HAnXGbtXT7QF7hp8BDfVVNf+ORARvSiU+O6EqCKMvlJXy/5/XdG5V
> eNJMPVcCVIrQKMgumjBKZqDNjqf0vdq9ee9wJKoc+RsxCUMkXprSANJyzew5q/xj
> hpjv9YMthLjrIBOVcSY/+IrRfG8FzJpbrv7uDMwJoQm5/LjB6FKz/+sMaleLpHKv
> tBOt1Uf1auR1qVdDHZDqfRamTn0Y92VNfbfZVmOkj/fohtlcs0ecJjEDwMgmS6Mb
> 6jPxYZAeHt96ygN32CVPljW23tVBdw==
> =bZbJ
> -----END PGP SIGNATURE-----

-- 
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/CAKYFi-5UvOPiX54g_jU423d_o6810FJwerzA3CL3w1ErFqcB7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to