I usually run many programs and virtual machines on my desktop. The CPU isn't the bottleneck but the memory. (Buying more memory isn't a solution because it's not my own computer.)
I started experimenting with compcache and it works fine on compressing memory. I can increase it's usage by swappiness 100. But when real (uncompressed), memory starts to fill up then Linux starts to empty caches and buffers before massive swapping what is bad for me because switching between programs gets painfully slow.
I wasn't able to find a way to reserve memory for buffers and caches so I started to look alternate ways and found cgroups.
In cgroups you can't set memory limit for root resources so I tried to move all processes into a group with limited memory, but somehow it didn't seems working.
Please help how can I reserved memory for buffers and caches and start swapping to compcache at an early stage.