I haven't verified if this actually fixes the problem but it seems to make a huge difference in 'free' memory as shown by 'free'.
I had already closed my VMs by the time I tried this so haven't verified if it stops the long freezes yet.
total used free shared buff/cache available
Mem: 31030 5331 2790 5347 22907 19900
Swap: 32767 3130 29637
echo 3 > /proc/sys/vm/drop_caches
total used free shared buff/cache available
Mem: 31030 5349 17122 5312 8557 19915
Swap: 32767 3130 29637
Notice the 2790 -> 17122 change above in 'free', and 22907 -> 8557 for buff/cache.
It appears the kernel doesn't get rid of cache in a reasonable timeframe at the expense of swapping programs out to disk while i/o is happening, which causes gui freezes.
I haven't verified if this actually fixes the problem but it seems to make a huge difference in 'free' memory as shown by 'free'.
I had already closed my VMs by the time I tried this so haven't verified if it stops the long freezes yet.
total used free shared buff/cache available
Mem: 31030 5331 2790 5347 22907 19900
Swap: 32767 3130 29637
echo 3 > /proc/sys/ vm/drop_ caches
total used free shared buff/cache available
Mem: 31030 5349 17122 5312 8557 19915
Swap: 32767 3130 29637
Notice the 2790 -> 17122 change above in 'free', and 22907 -> 8557 for buff/cache.
It appears the kernel doesn't get rid of cache in a reasonable timeframe at the expense of swapping programs out to disk while i/o is happening, which causes gui freezes.