Ask Your Question

fstab and cache

asked 2014-10-18 04:39:52 -0500

BPiek gravatar image

updated 2014-10-18 04:41:46 -0500


I have few questions regarding the fstab used for SSD optimalization.

  1. I found two versions of ho to set up some space for cache files

    • tmpfs /home/user/.cache/spotify/Storage tmpfs size=10% mode=0777 0 0
    • none /home/user/.cache/spotify/Storage tmpfs size=10% mode=0777 0 0

    what's the difference with tmpfs and none on the beggining?

  2. when I put few of cachce to tmpfs i loose those ram space for other things, right? so wheni set up this for eg. chrome, spotify, each for 10%- i'll have 80% of ram to operate on?

  3. If 2. Q is as I thought- is there a better idea? eg making some cachce space where I'll put all the caches? Now It's like this that If I run spotify it can use 10% of ram even when chrome is not running, but this chrome-ram-cache is not available. So- would it be better to put whole ~/.cache to tmpfs?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-19 14:37:03 -0500

rsc gravatar image

updated 2014-10-19 14:38:25 -0500

I am not aware of a difference between "tmpfs" and "none" for the first column of fstab, because it is meant for the block special device or remote filesystem to be mounted (see "man fstab"). Given that tmpfs comes from memory, I don't think the value really matters here. Looking to a standard Fedora or RHEL installation it is usually "tmpfs" (run "mount | grep tmpfs" on a freshly installed system to see what I mean).

Yes, you will loose RAM - but that's the price of tmpfs. The size parameter limits this tmpfs instance to that given percentage of your physical RAM (see "man mount" for reference and details, search for "tmpfs").

Yes, you could put the whole "~/.cache" on tmpfs - given that you can estimate the needed size. I don't think it makes sense to suggest you symlinking solutions for specific directories (if you think about, be careful regarding SELinux). With one tmpfs for "~/.cache" you have at least the benefit that free space can be used by other applications, yes.

edit flag offensive delete link more


Thanks, I'll look up man pages when I find spare time.

BPiek gravatar imageBPiek ( 2014-10-19 15:40:39 -0500 )edit

Question Tools

1 follower


Asked: 2014-10-18 04:39:52 -0500

Seen: 350 times

Last updated: Oct 19 '14