Siduction Forum

Siduction Forum => Installation - Support => Topic started by: LRC1962 on 2018/04/07, 12:52:16

Title: Where to place/tmp /var/cache directories to avoid SSD usage
Post by: LRC1962 on 2018/04/07, 12:52:16
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?
Title: Re: Where to place/tmp /var/cache directories to avoid SSD usage
Post by: dibl on 2018/04/07, 13:20:08
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.
Title: Re: Where to place/tmp /var/cache directories to avoid SSD usage
Post by: melmarker on 2018/04/07, 17:37:42
@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.
Title: Re: Where to place/tmp /var/cache directories to avoid SSD usage
Post by: dibl on 2018/04/07, 21:04:55
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.  ;-)