Another alternative to tmpfs backed by zram for swap when you're OK with fixed sized space allocations is to use a compressed filesystem within tmpfs
# Create a 1GB btrfs filesystem within tmpfs (/dev/shm)
cd /dev/shm
dd if=/dev/zero of=btrfs.fs bs=1M count=1024
mkfs.btrfs /dev/shm/btrfs.fs
# Mount that filesystem specifying to use lzo compression
mkdir /mnt/btrfs
mount -o compress=lzo /dev/shm/btrfs /mnt/btrfs
# Test it
cd /mnt/btrfs
dd if=/dev/zero of=bigfile bs=1M count=2048
... and file created ok, that is stored in a lzo compressed filesystem based in tmpfs, where df -h indicates 73MB used, 841MB available of the 1GB total /mnt/btrfs size after creation of that 2GB of zeros file (/mnt/btrfs/bigfile) (/dev/shm with 1.7GB size on my system shows 1GB used, 677MB available).
I did initially try mounting it using -o compress=lz4 instead, but my Fatdog 812 system didn't permit that.
Going the other way, most compression/slowest and
https://git.kernel.org/pub/scm/linux/ke ... 0d7ee5b2e7
indicates very slow compression for mount -o compress=zstd:15 ..., but that might still be OK for EasyOS given a desire to maximise 'changes' storage space/minimise amount of writes to USB. Mostly it is the writing (compression) that is slow, decompression/read is still relatively quick. But perhaps the progressive writes (changes) may not be a factor, maybe no slower than if writing to a mechanical storage device. Whilst reading (to write to USB when a save occurred) is still relatively quick.
dd'ing another 2GB of zeros into compress=zstd:15 did take noticeably longer, but still quicker than if to disk, and resulted in df -h showing 61MB used (compared to 73MB for when using compress=lzo above).
For another test I unsquashfs'd my fd64.sfs (main fatdog sfs) to /mnt/btrfs mounted with zstd:15 compression, was sluggish, at times with the spinner/bar mksquashfs extraction line halting for a number of seconds. Of the 2448MB uncompressed size of that fd64.sfs it got to 64% extraction completed before ending with a out of space error showing 32432/50555 (64%) progress status, so stored around 1570MB of total 2448MB of fd64.sfs content/data on that measure.
Repeating the unsquashfs except into a -o compress=lzo and the bar/spinner kept running continually, but wasn't that much/noticeably quicker and it got to 31974/50555 (63%) before being out-of-space. In other words zstd:15 highest compression level wasn't that much better than just straight lzo compression. Conclusion for me from this type as I test/do-it is that the higher levels of compression available might make relatively little difference in the EasyOS usage case.
Should also say that the tests were run without any swap being available, on a oldish 2 core 4GB ram AMD laptop system.