I'm going to reduce SSD writes, so I'd like to keep changes to some directories (like /var/log or browser cache) in memory and syncing to permanent storage periodically. I should reduce memory size as much as possible, so only changes should be saved to memory;changes in memory should be stored compressed (zram)after periodical (10-30 min or so on poweroff time) syncing to persistent storage changes should be removed from memory.What is a better way to do this? I can get first 2 items using overlayfs, but I'm not sure how to sync merged dir to lower online and clean upper dir in proper way.
Proper way to create persistent RAM fs
synchronization;overlayfs