seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2020/04/04, 17:44:44


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Where to place/tmp /var/cache directories to avoid SSD usage  (Read 1510 times)

0 Members and 1 Guest are viewing this topic.

Offline LRC1962

  • User
  • Posts: 67
Because of the way SSDs are made, it seems the best idea is to place cache and tmp directories normally in root and put them on a SATA HD. I know that you can create a partition just for them, but is it possible to move them onto your/home partition?

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 1.962
    • Land of the Buckeye
NO, you do not want any files owned by root in your user's home directory.  The login manager will not permit the user to log in where root files are located.
Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO, 2@WD1003FZEX in BTRFS

Offline melmarker

  • Global Moderator
  • User
  • *****
  • Posts: 2.800
    • g-com.eu
@LRC1962: the best place for /tmp is a tmpfs - the same might be true for a cache - otherwise one must write daily an insane amount of things to a modern ssd to destroy the device within the prospected life time of a ssd. And there is another thing to mention - i want it fast - thats why i use ssd's - and within 2-3 years there wll be faster, bigger and cheaper models, so it make no sense to limit writing to ssds.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 1.962
    • Land of the Buckeye
If it makes you feel better about the SSD, you can  add these lines to your /etc/fstab file:

Code: [Select]
none                                          /tmp                 tmpfs        defaults,noatime,mode=1777                    0    0
none                                          /var/tmp             tmpfs        defaults,noatime                              0    0
none                                          /var/spool           tmpfs        defaults,noatime                              0    0

You could do the same with /var/log but you will never have a history of logged information because it will be lost every shutdown..

For browser or other user caches, there is a temporary user folder created at boot time at /run/user/nnnn, where "nnnn" is the user ID number, for example 1000 for the first user.  You can make a directory there and set your browser to use that for the cache directory, according to the browser's settings for cache location.  This cache will also disappear at shutdown, which may be a good thing for some users.  ;-)
« Last Edit: 2018/04/07, 23:10:04 by dibl »
Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO, 2@WD1003FZEX in BTRFS