/tmp vs. /dev/shm for temp file storage on Linux?
问题 I have scripts that make hundreds of quick succession, small, temp files needing to be created and very soon read back in, then unlinked. My testing shows little if any performance difference by putting said files in /tmp (to disk) or into /dev/shm (filesystem-level shared memory) on Linux even under moderate load. I attribute this to the filesystem cache. Granted the disk will eventually get hit with the fileystem actions, but on multiple small write-read temp files, why would you (not)