Gentoo Archives: gentoo-user

From: Kai Krakow <hurikhan77@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: /var/tmp on tmpfs
Date: Sat, 10 Feb 2018 18:02:57
Message-Id: slo3le-2ni.ln1@hurikhan77.spdns.de
In Reply to: [gentoo-user] /var/tmp on tmpfs by gevisz
1 Am Thu, 08 Feb 2018 19:11:48 +0200 schrieb gevisz:
2
3 > I never used tmpfs for portage TMPDIR before and now decided to give it
4 > a try.
5 >
6 > I have 8GB of RAM and 12GB of swap on a separate partition.
7 >
8 > Do I correctly understood
9 > https://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs that I can safely
10 > set in the fstab the size of my tmpfs to 12GB so that the chromium could
11 > be emerged in tmpfs (using the swap) without the need to set
12 > notmpfs.conf for chromium and the likes.
13 >
14 > And I am going to set the whole /var/tmp/ on tpmfs instead of just
15 > /var/tmp/portage Is it ok?
16
17 I'm using systemd automounts to discard /var/tmp/portage when there is no
18 longer a user of this directory. It has one caveat: If you want to
19 inspect build problems, you should keep a shell running inside.
20
21 Here's the configuration:
22
23 $ fgrep portage /etc/fstab
24 none /var/tmp/portage tmpfs noauto,size=150%,uid=250,gid=250,mode=0775,x-systemd.automount 0 0
25
26 $ cat /etc/tmpfiles.d/portage.conf
27 D /var/tmp/portage 0775 portage portage
28 x /var/tmp/portage
29
30 I used ccache before but building in tmpfs is much faster.
31
32 I'm currently experimenting with tuning vm.watermark_scaling_factor as the
33 kernel tends to swap storms with very high desktop latencies during package
34 builds which consume a lot of tmpfs. This is behavior I'm seeing since
35 kernel 4.9, worked better before.
36
37 As such, I think it makes most sense to put only /var/tmp/portage on tmpfs.
38 Programs may expect /var/tmp as being non-volatile over reboots.
39
40
41 --
42 Regards,
43 Kai
44
45 Replies to list-only preferred.