1 |
On 05/24/2017 08:16 AM, Ian Zimmerman wrote: |
2 |
> So what are gentoo users' opinions on this matter of faith? |
3 |
> |
4 |
> I have long been in the camp that thinks tmpfs for /tmp has no |
5 |
> advantages (and may have disadvantages) over a normal filesystem like |
6 |
> ext3, because the files there are normally so small that they will stay |
7 |
> in the page cache 100% of the time. |
8 |
> |
9 |
> But I see that tmpfs is the default with systemd. Surely they have a |
10 |
> good reason for this? :) |
11 |
|
12 |
Their reason is described here: |
13 |
|
14 |
https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems |
15 |
|
16 |
It seems that they consider it an important *default* to have /tmp exist |
17 |
even if nothing else exists yet during boot-up. |
18 |
|
19 |
Normally I wouldn't care too much whether /tmp is tmpfs or not. The only |
20 |
cases where I do care, is when unpacking a huge tarball with contents I |
21 |
didn't intend to keep around. But I stopped doing that in /tmp anyway. I |
22 |
have my own ~/tmp for that now. When using /tmp for that, you need to rm |
23 |
-rf what you don't need anymore, since it eats up RAM. |
24 |
|
25 |
Another case is when I download something big that I intend to install |
26 |
(*.bin installers) or unpack into a final location on disk. In those |
27 |
cases, /tmp on tmpfs helps since it lowers disk fragmentation: you |
28 |
download it to RAM, then install to disk. |