Hi Felix,

due to some OOM issues I recently became aware that OpenWrt (or rather, you in 
[1]) set the vm.min_free_kbytes to quite excessive values:

16M for 128M RAM
8M for 64M RAM

The value for 32M devices has been reduced in a later patch [2].

These values seem high (1/8 or 12.5 %), and in a kernel comment here [3] we 
found a much lower recommendation, even addressing low-mem devices.

Apart from theoretical discussions, this is of cause a real problem on 64MB RAM 
devices (particularly with ath10k active), where RAM is scarce.
On a typical OpenWrt installation, OOM-Killer becoming active will typically be 
a problem in almost every case, since there are not many applications running 
that are not essential.

I wonder whether we could not reduce these values to something much lower, e.g.
2M for 128M RAM
1.5M for 64M RAM
(1M for 32M RAM is set already)

That would still be above the recommended values in [3], but increase the 
amount of "available" memory by 6.5 M on 64M devices.

Would you (or others) comment on this please, so I don't prepare a patch just 
to be told I overlooked something.

Best

Adrian



[1] 
https://github.com/openwrt/openwrt/commit/5c9cc7b7f8920944a413644e1c2ea23bfe655bcb
[2] 
https://github.com/openwrt/openwrt/commit/25dab5d217715300dc609df07b56e5b73cefdfc1
[3] https://elixir.bootlin.com/linux/v4.14.222/source/mm/page_alloc.c#L6974

Attachment: openpgp-digital-signature.asc
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to