On 06/01/2012 02:05 PM, Pádraig Brady wrote:
It seems like we should default to /var/tmp in sort(1) and tac(1), as debian and fedora at least are probably moving to tmpfs for /tmp. I'll monitor the situation a bit before making the change.
Thinking a bit more about this, as I see it: /tmp = stateless /var/tmp = stateful What is actually used to back those paths is system specific and inconsequential to `sort`. `sort` logically just needs stateless storage, as after sort exits, its tmp files are no longer useful. If `sort` could restart operations then that would be a different story. So `sort` should stick to /tmp I think, and not worry about system implementation details. As an aside on tech for backing those paths: Ideally, tmpfs could be used for /tmp even for large files as swap could be used as needed. This swap could even be over nfs/nbd for nodes without stateful storage. If the swap (over net) implementation isn't up to scratch, then as a pragmatic solution one might need to configure paths considering 'size' as well as 'statefulness' and have /large_tmp which is backed by a traditional file system on disk and auto cleaned on boot. Disadvantages of that are: 1. require boot cleanup scripts 2. traditional file system on disk doesn't take advantage of the fact that we don't _need_ to persist the data to disk/flash/net (which can be slower and less reliable). Traditional disk backed /tmp avoids possible swap issues with large files, but suffers from the above 2 disadvantages. Another pertinent piece of info is that Debian have reverted the default setting of tmpfs backed /tmp: http://packages.debian.org/changelogs/pool/main/s/sysvinit/current/changelog#version2.88dsf-26 cheers, Pádraig.