Date: Mon, 22 Jan 2024 03:27:57 +0000 From: Jessica Clarke <jrtc27@freebsd.org> To: Mike Karels <karels@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Message-ID: <FCB7B75C-1816-4F93-9560-59208F5A8781@freebsd.org> In-Reply-To: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> References: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19 Dec 2023, at 15:34, Mike Karels <karels@FreeBSD.org> wrote: >=20 > The branch main has been updated by karels: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D636592343c3ec0feb61a4d8043676381= 384420dd >=20 > commit 636592343c3ec0feb61a4d8043676381384420dd > Author: Mike Karels <karels@FreeBSD.org> > AuthorDate: 2023-12-19 15:33:33 +0000 > Commit: Mike Karels <karels@FreeBSD.org> > CommitDate: 2023-12-19 15:33:33 +0000 >=20 > tmpfs: increase memory reserve to a percent of available memory + = swap >=20 > The tmpfs memory reserve defaulted to 4 MB, and other than that, > all of available memory + swap could be allocated to tmpfs files. > This was dangerous, as the page daemon attempts to keep some memory > free, using up swap, and then resulting in processes being killed. > Increase the reserve to a fraction of available memory + swap at > file system startup time. The limit is expressed as a percentage > of available memory + swap that can be used, and defaults to 95%. > The percentage can be changed via the vfs.tmpfs.memory_percent = sysctl, > recomputing the reserve with the new percentage but the initial > available memory + swap. Note that the reserve can also be set > directly with an existing sysctl, ignoring the percentage. The > previous behavior can be specified by setting = vfs.tmpfs.memory_percent > to 100. >=20 > Add sysctl for vfs.tmpfs.memory_percent and the pre-existing > vfs.tmpfs.memory_reserved to tmpfs(5). >=20 > PR: 275436 > MFC after: 1 month > Reviewed by: rgrimes > Differential Revision: https://reviews.freebsd.org/D43011 I just got: make[6]: Could not create temporary file /tmp/makeDl4i9S: No space = left on device after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp is a tmpfs, with the prior buildworld having taken me past this commit, which I strongly suspect to be the cause. Whilst I understand the motivation behind your commits, this is a sad regression to have; it=E2=80= =99s not exactly a particularly strange situation. The system is a HiFive Unmatched, for what it's worth. Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FCB7B75C-1816-4F93-9560-59208F5A8781>