look as an examples at following - https://github.com/graysky2/profile-sync-daemon - https://wiki.debian.org/SSDOptimization#Persistent_RAMDISK