[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

TMPDIR - Do we also need a drive backed TPMDIR ?



This bug is an example of the problem. I am bringing it here to know views of
fellow developers.

I am not sure if there's an fd.o defined standard for environment variables, but
a quick web search pointed to the IEEE and Open Group link.

None of the standards talk about where TMPDIR should be pointing to. On
GNU/Linux, I recollect it pointing to /tmp and always wondered what environment
variable would point to /var/tmp

On the Debian front, I can't recollect what our official stand is. I could find
a conversation at the following link. It is fairly recent from 2012.

My /tmp is on tmpfs. I just don't recollect if it was the default or I enabled
it explicitly. Currently, it is managed by systemd, but I do recollect
initscripts providing similar feature.

● tmp.mount - Temporary Directory
   Loaded: loaded (/usr/share/systemd/tmp.mount; enabled; vendor preset:
   Active: active (mounted) since Wed 2016-07-20 21:50:05 IST; 19h ago
    Where: /tmp
     What: tmpfs
     Docs: man:hier(7)
   CGroup: /system.slice/tmp.mount

Jul 20 21:50:05 learner systemd[1]: tmp.mount: Directory /tmp to mount over is
not empty, mount
Jul 20 21:50:05 learner systemd[1]: Mounting Temporary Directory...
Jul 20 21:50:05 learner systemd[1]: Mounted Temporary Directory.

Now, back to the actual problem. For many applications, we rely on the TMPDIR
environments. Tools like Python's modules help use these variables and not worry
about the underneath platform.

Under Linux, with /tmp more commonly on tmpfs, how are developers dealing with
it? tmpfs is limited and multi gigabyte operations may end up filling it all (as
is the case in the debdelta bug report above).

The whole idea of tmpfs for /tmp was performance. Email attachments could be
temporarily opened under tmpfs

But what do we do about larger operations where temporary data may have the
possibility of being huge. I think most video/audio transcoding workflows may be
hit by this.

Should there be another TPMDIR? Like DTMPDIR, pointing to the underneath disk,
where size is limited by the capacity available to partition/disk ?

This could allow developers to choose one over the other based on their needs.
It could also help standardize it as a fallback.

Given the large number of mailing lists I follow, I request you to CC
me in replies for quicker response

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: