I have 8 gb of ram, ssd and very greedy for ram Android studio/gradle. and sometimes when gradle builds project(eats ram) it hangs all ubuntu(and xubuntu). ui becomes so laggish - mouse cursor moves 1 cm per 10 seconds.
i dont know why it happens and it seems that no one knows cause there is a couple questions like mine in internet about "studio freezes ubuntu", "heavy for ram application freezes ubuntu", "ubuntu hangs when full ram", etc. and symptoms are the same. and there is also tracked bug since 2007. it seems that it's very specific situation because in one moment gradle needs a lot of ram for operating with big files on disk. it seems like at the same time it needs both ram and storage for opperating with big files. and somehow it hangs the system.
so my question is - is there any option to disable buff/cache? or maybe param like swappines (0..100) but for buff/cache? i know that i shouldn't care for ram used for cache because it is available at any time, but i think in this case it doesn't work as should. maybe i am drastically wrong)
free
/top
commands will not be affected by drop_caches, the main reasons are here: https://unix.stackexchange.com/questions/322168/why-are-some-caches-not-droppable – sourcejedi Jun 29 '19 at 18:36