lin_os_swap_mod icon indicating copy to clipboard operation
lin_os_swap_mod copied to clipboard

Swappiness is too high

Open devnoname120 opened this issue 1 year ago • 1 comments

The module currently sets the swappiness to 99 which is a very high value:

https://github.com/janithcooray/lin_os_swap_mod/blob/ce839a090f6f99cddfd2d50b27319bed9600e621/module/service.sh#L8

The problem with this approach is that Android will very eagerly move everything to the swap even if there is plenty of memory left. This slows down the whole device because Android keeps having to move back and forth pages to the swap and then back to the memory, and this causes elevated wear on the storage.

I would suggest to decrease the vm.swappiness value to 60, which is standard in Linux desktop environments. What do you think?

devnoname120 avatar Aug 15 '24 20:08 devnoname120

Thanks for taking the time to look at this. this is true, its quite a know drawback on swap. but yes, i will release version with multiple options

janithcooray avatar Aug 17 '24 14:08 janithcooray