Results 1 to 10 of 14

Thread: tmpfs /var/tmp?

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Montréal (Québec)
    Beans
    142
    Distro
    Ubuntu Development Release

    tmpfs /var/tmp?

    I've implemented tmpfs on my Quantal setup, but I have a question about /var/tmp.
    Most SSD optimization pages recommend something lilke:
    tmpfs /var/tmp tmpfs defaults,noatime,mode=1777,size=10% 0 0
    However, the archlinux wiki says: "Do NOT use it on /var/tmp, because that folder is meant for temporary files that are preserved across reboots."
    https://wiki.archlinux.org/index.php/Fstab

    Could a savvy forum member please clarify if yes or no I should have it in tmpfs for a SSD setup,

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: tmpfs /var/tmp?

    This should clarify things for you.

  3. #3
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,265
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: tmpfs /var/tmp?

    /var/tmp is intended to hold "temporary" files across boots.

    There is supposed to be an automatic process to clear out old files regularly.

    I do not know what effect there would be if you were to put it on temps; but, presumably, some programs would lose their state.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  4. #4
    Join Date
    Nov 2009
    Location
    Montréal (Québec)
    Beans
    142
    Distro
    Ubuntu Development Release

    Re: tmpfs /var/tmp?

    Thanks guys, it all confirms that /var/tmp should not be in tmpfs.

  5. #5
    Join Date
    Oct 2008
    Location
    ExodusHair<Čubura
    Beans
    3,853
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: tmpfs /var/tmp?

    Quote Originally Posted by Yahoé View Post
    Thanks guys, it all confirms that /var/tmp should not be in tmpfs.
    I've kept it for year+ in tmpfs and did not encounter any ill effect... So, it is kinda inconclusive...
    Code:
    tmpfs        /tmp           tmpfs    defaults,noatime    0    0
    tmpfs        /var/run       tmpfs    defaults,noatime    0    0
    tmpfs        /var/lock      tmpfs    defaults,noatime    0    0
    tmpfs        /var/log       tmpfs    defaults,noatime    0    0
    tmpfs        /var/run       tmpfs    defaults,noatime    0    0
    tmpfs        /var/mail      tmpfs    defaults,noatime    0    0
    tmpfs        /var/spool     tmpfs    defaults,noatime    0    0
    tmpfs        /var/tmp       tmpfs    defaults,noatime    0    0
    tmpfs        /var/cache     tmpfs    defaults,noatime    0    0
    P.S. The only caveat is that this way /tmp could get filled... But, a bit of care and that is also non-problem...
    Last edited by zika; October 9th, 2012 at 05:33 PM.

  6. #6
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,265
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: tmpfs /var/tmp?

    I think zika has given you the answer. You do not need /var/tmp to be on your SSD; it just makes it a bit easier for a few applications to maintain state. If you have the RAM, why not try it in tmpfs?

    But I wouldn't put /tmp in tmpfs, because when working on large files (for example when I record and edit videos and audio), there wouldn't be sufficient space.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  7. #7
    Join Date
    Oct 2008
    Location
    ExodusHair<Čubura
    Beans
    3,853
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: tmpfs /var/tmp?

    Quote Originally Posted by Paddy Landau View Post
    But I wouldn't put /tmp in tmpfs, because when working on large files (for example when I record and edit videos and audio), there wouldn't be sufficient space.
    Totally true. I emphasized that this only my experience and that I'm able to contain my needs for /tmp accordingly within my RAM... Even in the case that You mention I think there might be a way to redirect (temporary and output) files (only) from those applications in a folder that resides on HDD and thus prevent any problem. I know I did...

    http://ubuntuforums.org/showpost.php...46&postcount=3 reminded me that putting /var/cache in tmpfs might be a bad idea. I'll investigate more. This thread made me open tmpfs again and it seems that I should have read my notes before that... There was one reinstall in the meantime at the end of testing 12.04... and...
    Update: Yes, it seems that putting /var/cache in tmpfs produced error in http://ubuntuforums.org/showpost.php...46&postcount=3 . Mea culpa...
    Last edited by zika; October 10th, 2012 at 09:29 AM.

  8. #8
    Join Date
    Apr 2010
    Beans
    212

    Re: tmpfs /var/tmp?

    Archlinux is different. If you just want to make an easy tmpfs, you can mount it to /tmp.

  9. #9
    Join Date
    Nov 2009
    Location
    Montréal (Québec)
    Beans
    142
    Distro
    Ubuntu Development Release

    Re: tmpfs /var/tmp?

    Still, it's not meant to be.
    Moreover /var/run and /var/lock are already redirected to tmpfs by default, so placing them in fstab is redundant.

  10. #10
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,265
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: tmpfs /var/tmp?

    Quote Originally Posted by Yahoé View Post
    The filesystem hierarchy standard is very clear about this…
    Thank you for the link to the standards.

    Quote Originally Posted by Yahoé View Post
    … /var/run and /var/lock are already redirected to tmpfs
    I am curious as to why /run/lock and /run/shm are set up as tmpfs when /run already is tmpfs? It seems redundant.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •