Gentoo Archives: gentoo-dev

From: Zoltan Puskas <zoltan@×××××××××.info>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] systems-246 changes tmpfs default size from 50% to 10% of RAM
Date: Wed, 29 Jul 2020 00:26:00
Message-Id: 20200729002552.GC4811@zenit
In Reply to: Re: [gentoo-dev] systems-246 changes tmpfs default size from 50% to 10% of RAM by Mike Gilbert
1 On Tue, Jul 28, 2020 at 03:19:26PM -0400, Mike Gilbert wrote:
2 > On Tue, Jul 28, 2020 at 3:13 PM Mike Gilbert <floppym@g.o> wrote:
3 > >
4 > > On Tue, Jul 28, 2020 at 2:50 PM Zoltan Puskas <zoltan@×××××××××.info> wrote:
5 > > >
6 > > > Hi,
7 > > >
8 > > > I've upgraded to and running systemd-246_rc2 on one of my systems and
9 > > > noticed that tmpfs mounted directories are significantly smaller.
10 > > >
11 > > > This is because with commit
12 > > > https://github.com/systemd/systemd/commit/7d85383edbab73274dc81cc888d884bb01070bc2
13 > > > they have changed them to be 10% of the physical memory instead of the
14 > > > default of 50%.
15 > > >
16 > > > This is a potentially breaking, or at least an unexpected behaviour
17 > > > change, especially for people using tmpfs on /tmp for compiling.
18 > > >
19 > > > Maybe we should make a news item to let people know that they either
20 > > > need to add an fstab entry with size option set, or better, create a
21 > > > systemd local override with relevant content.
22 > >
23 > > Don't use /tmp for PORTAGE_TMPDIR. /tmp is meant for small temporary
24 > > storage. If you want to compile in a tmpfs, set up a separate mount
25 > > point for it.
26 > >
27 > > I don't intend to create a news item for this, but I would not object
28 > > to someone else doing it.
29 >
30 > Also, the limit for /tmp is likely to change again before the 246 final release.
31 >
32 > https://github.com/systemd/systemd/pull/16576
33 >
34
35 I volunteer to write the news item.
36
37 It seems other distros also have met the overly restricted /tmp size
38 issue, due to yet another legitimate use case (see the RedHat bug
39 referenced in the PR: https://bugzilla.redhat.com/show_bug.cgi?id=1856514).
40
41 It's worth noting that above PR only resets only /tmp size, but will
42 keep /dev/shm, /run, etc. at the lower limit. While we have to wait and
43 see what the final form will be for systemd-246, I think it'd be useful
44 to notify users. Systemd changing the age old convention of non
45 configured tmpfs mount sizes (from a user's perspective non configured)
46 it means openrc and systemd boxes will end up with different behaviours
47 (e.g. /dev/shm will now be sized differently).
48
49 Cheers,
50 Zoltan