Thanks for the really useful discussion here about zram. I just wanted to add the symptoms I observed with Armbian (Stretch, no GUI) on a 512Mb Orange Pi One which I'm pretty sure (but cannot prove) was due to out of memory conditions, in case this report helps others with the same symptoms.
Normal service with Opi1/Armbian for me is to get indefinite uptime (>>6 months). I was experiencing unexpected crashes after 1-2 weeks and as I run a UPS and am using an M2.SATA SSD to USB adapter its unlikely that powering or sdcard issues are a root cause.
When observing the crashes roughly 80% seemed to occur 1-2minutes after the apt.daily timer fired (as reported by 'systemctl list-timers'), the remainder seemed to occur at random. As I've got an SSD I decided to add 512Mb swap on top of the zram automatically configured. I set the prioriy of the SSD swap below that of zram and vm.swappiness = 60 (suggestions as to correct setting in these circumstances much appreciated though, I haven't experimented).
The system has now been up for approaching 1 month without further outage. swapon -s shows that just under 20Mb of swap on the SSD is in use. zram is used heavily.
Filename Type Size Used Priority
/swapfile1 file 524284 18308 2
/dev/zram1 partition 252000 198692 5
I think that for users with SSD like me it may be useful to supplement zram with normal swap in the case where they have a device with a small amount of memory such as an Opi1. Comparing Armbian Buster to Stretch memory footprint for my use case, I wonder if this may become more important going forward?