Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 2021 10:11:23 -0600
From:      Warner Losh <wlosh@bsdimp.com>
To:        Gary Jennejohn <gljennjohn@gmail.com>
Cc:        Alexey Dokuchaev <danfe@freebsd.org>, Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 0a99422970d7 - main - Move mips and arm to 1000Hz by default.
Message-ID:  <64D62F0A-A7CA-4D4F-92E8-D4FF173F7870@bsdimp.com>
In-Reply-To: <20210617093111.5a537750@ernst.home>
References:  <202106170201.15H215Z6078742@gitrepo.freebsd.org> <YMsT7mfByZa5765c@FreeBSD.org> <20210617093111.5a537750@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]


> On Jun 17, 2021, at 3:31 AM, Gary Jennejohn <gljennjohn@gmail.com> wrote:
> 
> On Thu, 17 Jun 2021 09:20:46 +0000
> Alexey Dokuchaev <danfe@freebsd.org> wrote:
> 
>> On Thu, Jun 17, 2021 at 02:01:05AM +0000, Warner Losh wrote:
>>> commit 0a99422970d7fbdb1e17724339a8dc37082f3431
>>> 
>>>    Move mips and arm to 1000Hz by default.
>>> 
>>>    armv6 and armv7 systems already were 1000Hz. The other armv5 were a
>>>    mix of 100 and 1000. This changes them to 1000. Should there be
>>>    issues, we can add options HZ=100 to the systems that have bad
>>>    performance at the drop of a hat.
>> 
>> Do we have this 1000Hz vs. 100Hz thing documented somewhere for those
>> who are thinking about tuning it?  There are various "optimization"
>> howto's floating on the Internet here and there which recommend this
>> change, so it would be nice to have some definitive documentation on
>> the subject, e.g. in our Handbook or Wiki.
>> 
> 
> It's discussed in /sys/conf/NOTES, but most users probably wouldn't
> think about looking there.  An entry in the Handbook or Wiki could
> be useful.

I’ve brought over NetBSD’s hz(9) and hardclock(9) man pages in https://reviews.freebsd.org/D30802 with adjustments for FreeBSD. I mention the kern.hz tunable and the fact that it default to 100 for VM guests. This should cover people’s curiosity as well as plug the hole in our docs. All this stuff was from 4.4BSD, so NetBSD’s man pages were a good place to start.

The HZ kernel option is something almost nobody should be adjusting. I’ve updated the text slightly in NOTES in https://reviews.freebsd.org/D30804 if people want to tweak it further before I commit. Wiki is terrible for this stuff, since it goes stale too quickly, but I’d be happy to review someone else’s changes to the handbook for tuning this value (though honestly, it should almost never be frobbed). kern.hz likely shouldn’t be adjusted either, but it’s a much easier knob to turn than rebuilding the kernel with a new HZ and there’s more cases where it can be useful (though tests I’ve done in the past suggest values > 10,000-50,000 might not be that useful).

Finally, NetBSD has an option(4). We’re long past the time where we should consider it. I’d love to review changes for that too. Most of a first cut on text can be stolen from NOTES, if someone is looking for an easy project (it need not be complete to be useful, at least initially)

Warner

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIzBAEBCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmDLdCsACgkQbBzRKH2w
EQDsRhAAzi5FLrUlwBp1+CEsizCnUR2YSlycuvEwX5szj1QXYE7WLxiSyYPWWLFR
5OtSRCUJnCH+hF17g+A9FAlR9zEefOcc9qqhAsKELH7zLZFzhCT+3PtYrHPp5oY4
WSlR55vmJJvHCyenrFN/jY4XqsLMLeuwJFXx8ZgzPYr/YUJ5O/nmOMXfSnotGCjm
rOQNBMX4ig2618KgLn0yQfvkQDyUt/vn/yEMiOJu+6qZ+tipANHq7dWscDAODEkv
gwktkyZP3kFW3e06Rl9td846FMwNxS7kthJLfIXcJ6fzFBTMQcCM9SIwg36mj2UZ
lrI6JKW0oIVEVQ88AHBayTb4a7zTLZWfgOXVRMZmWZu8IriW+ch7fs/INCvNlGzT
CAjvIb/j21LJnmPXuOp9RJAPCNIA4Kp+7fOuD+aQBHNi8j0Mfg8o3OerQRHpnTMk
Cokh57YeGcq3Y/MeWil+c74CCUJA3xBWQ0ALIAtjIINuCkGgmgn1wBzdZMO1F1y9
tD1WQrAYZ5NIgvcAAmRjJwYj+1s2acs0Lr9yNwkZXjKgVzCvf2J6AGms19JXduBc
zFE7j9VKXq+3QqUfTO2fbaOasi9h+ovaajBuHVo9K7FyErSKgGAsh/8sC8N8+2jD
1uqMXkmMjaYvwVQ4X21eX8Dv+PoP1CnjS9JUCLn+dmc92BJ2eDM=
=ymi/
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64D62F0A-A7CA-4D4F-92E8-D4FF173F7870>