upvote
But is that a default usecase?
reply
well YES, even on desktop

Many, many apps do "download to tmpfile then move to final location when finished", from browsers thru Steam to package managers.

reply
That's a metadata action and has nothing to do with rewriting the blocks of the file.
reply
that would be true if /tmp and the destination happen to be on the same filesystem, but I don't think that's a safe assumption. Especially if you are using tmpfs which stores /tmp in ram or swap.
reply
No, on a multi-tenant machine I really, really want that tempfile thing to be throttled on dirty page creation. If that process thinks it can run in constant space without externalizing the page cache then it knows what to do: write its temporary objects to anonymous memory, not files.
reply
And then you need to worry about swapping.
reply