NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: create /tmp with ffs vs. tmpfs ?



On Sun, Aug 11, 2024 at 06:54:55PM -0700, Steve Rikli wrote:
> I'm re-installing several old and new systems with NetBSD 10.0, one of
> them is a 32-bit ITX PC, with VIA C7 CPU.
> 
> It has small memory (1GB max) but plenty of disk (128GB SSD). sysinst
> says default size of "25%" for /tmp; from experimenting with other PC's,
> I believe that's "25% of main memory" (RAM) with tmpfs.

Yes.

> Two questions:
> 
> 1) is my understanding correct? I.e. does tmpfs use main memory for
>    backing, rather than swap or something else?
>
> This page says memory first, then swap:
> https://www.netbsd.org/docs/guide/en/chap-tuning.html#tuning-system-mfs
> so I'm mostly just checking.

Yes, but the size limit is derived from ram size just as a big thumbs
number (assuming machines with big ram will have big workloads). You
can set the size to e.g. 100mb instead, or whatever fits your
workloads.

> 
> 2) can I configure /tmp as ffs rather than tmpfs?

Yes, but in that case you may consider not making /tmp a separate mount
point (in sysinst: set size to 0). This removes the size limit - which
may be good or bad, depending on your usage.


Martin


Home | Main Index | Thread Index | Old Index