freebsd-src/sbin/newfs
Kirk McKusick 61dece6d27 Enable soft updates by default for UFS2 filesystems.
Soft updates dramatically improve the performance of UFS filesystems.
The newfs(8) utility currently does not enable them by default. The
FreeBSD installer enables soft updates by default. However custom
built installations that do not specify the -U option to newfs(8)
and the prebuilt UFS system images get filesystems without soft
updates enabled.

There are several testing sites that run benchmarks comparing the
performance of Linux distributions versus BSD distributions. When
they run filesystem comparison benchmarks they use newfs(8) to
create the UFS filesystem. Because it does not have soft updates
enabled it runs poorly versus the Linux ext4 filesystem. When I
have suggested to them that they should enable soft updates on the
UFS filesystem in their testing their response is that they expect
the utility that creates the filesystem to use optimal defaults and
that they cannot be expected to fiddle with various option settings.

The purpose of this change is to give a filesystem created with
newfs(8) reasonably optimal settings. For UFS2 this means enabling
soft updates. For UFS1 which tends to be used on small systems with
minimal memory and CPU speed, the lower memory footprint of running
without soft updates is a more sensible default.

This change adds a note in the section of the newfs(8) manual page
that describes the -U option for enabling soft updates that they
are enabled by default for UFS2 filesystems and that they can be
disabled by using tunefs(8).

Reviewed-by: Warner Losh, kib
MFC after:   1 week
Differential Revision: https://reviews.freebsd.org/D45201
2024-05-14 22:40:01 -07:00
..
Makefile sbin: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mkfs.c sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
newfs.8 Enable soft updates by default for UFS2 filesystems. 2024-05-14 22:40:01 -07:00
newfs.c Enable soft updates by default for UFS2 filesystems. 2024-05-14 22:40:01 -07:00
newfs.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
ref.test Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
runtest01.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
runtest00.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00