I also had problems like yours, but since I have installed an 2GB swapfile in Ubuntu16.04 - it’s allright, working very well.
Maybe my card only lives 2 years, doesn’t matter for this exellent desktop-system.
Sometime in the past couple months. I tried adding 2GB swap file using the dphys-swapfile package. Things got much better, but not all better. Freezes are far less frequent and last for minutes, not hours. It was still too annoying for serious desktop use.
I spent a bit more money and bought a couple octocore Odroid XU4, an upscale RPi on steroids for $59. It runs the same armhf ubuntu mate 16.04 with kernel modifications to support the different processor. It does slow down sometimes and you have to reboot and has a few minor quirks.
I’m hoping 18.04 will be out on this platform soon and it solves the remaining issues. In the past has the armhf version been released at the same time as the main release or did it follow weeks or months later?
I am not a great specialist in Linux, but I think, your way to install a swapfile with dphys-swapfile is a completely other thing than in the discription obove, specially written for ubuntu 16.04 lts.
Google’s translation of German web pages has gotten much better.
dphys-swapfile appears to have the same thing. Except, the defaults put a 2G swap file in /var/swap, and it does not set vfs_cache_pressure. I’ll experiment with that setting on my XU4 and RPi3 devices.