MAXPHYS bump for FreeBSD 13

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Nov 14 22:50:21 UTC 2020


--------
Konstantin Belousov writes:

> DFLTPHYS seems to be only used by drivers (and some geoms), and typical
> driver' usage of it is to clamp the max io request more than MAXPHYS.
> I see that dump code tries to not write more than DFLTPHYS one time, to
> ease life of drivers, and physio() sanitize maxio at DFLTPHYS, but this
> is for really broken drivers.

DFLTPHYS is the antique version of g_provider->stripesize, and
should be replaced by it throughout.

The history behind DFLTPHYS is that tape-drives were limited to
MAXPHYS sized tape-blocks, so you wanted it large.

For performance reasons disk operations should not span cylinders,
a topic I'm sure Kirk can elaborate on if provoked, so DFLTPHYS was
reduce them to a tunable size.

Peak performance was when fs-blocks divided DFLTPHYS and DFLTPHYS
divided the cylinder of the disk.

Seagate ST82500[1] with standard formatting had 0x616 sectors per
cylinder, (19 heads, 82 sectors each).  Formatting with a generous
22 spare sectors per cylinder brought the "usable" cylindersize
down to precisly 0x600 sectors, which resulted in around 5-10%
higher overall system performance on a heavily loaded Tahoe.

Poul-Henning

[1] The STI82500 "Sabre" is amusingly available for order in certain
web-shops but, alas, "not currently in stock".

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list