Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: tmpfs /var/tmp?

  1. #1
    Join Date
    Nov 2009
    Location
    Montréal (Québec)
    Beans
    139
    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,253
    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
    139
    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
    Exodus Hair<- Čubura
    Beans
    3,699
    Distro
    Ubuntu Development Release

    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,253
    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
    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.

  8. #8
    Join Date
    Oct 2008
    Location
    Exodus Hair<- Čubura
    Beans
    3,699
    Distro
    Ubuntu Development Release

    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.

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

    Re: tmpfs /var/tmp?

    Quote Originally Posted by zika View Post
    … there might be a way to redirect (temporary and output) files (only) from those applications in a folder that resides on HDD…
    Indeed, some applications provide that option. Not all do so, though; and, especially in the case of a shared computer, this could cause confusion and errors.

    There is a way to "combine" two folders into a single one, thus make /tmp in tmpfs with an overflow on the HDD or SSD, using unionfs (the mount-point version seems to be unavailable on Ubuntu, but you can install and use unionfs-fuse). I have not tested this thoroughly, though, so I do not know the restrictions and caveats.

    Quote Originally Posted by zika View Post
    Update: Yes, it seems that putting /var/cache in tmpfs produced error in http://ubuntuforums.org/showpost.php...46&postcount=3 .
    Thanks for that update.
    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.

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

    Re: tmpfs /var/tmp?

    New discovery:

    Making /var/cache transient disables the Ubuntu Software Centre, which fails with an error. (I now have to fix this.)

    Therefore, leave /var/cache on the HDD or SSD!
    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.

Page 1 of 2 12 LastLast

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
  •