* Is kernel/Kconfig.hz still up-to-date?
@ 2025-04-07 13:27 Diederik de Haas
2025-04-08 16:42 ` Christoph Lameter (Ampere)
0 siblings, 1 reply; 2+ messages in thread
From: Diederik de Haas @ 2025-04-07 13:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Christoph Lameter, Andrew Morton,
Thomas Gleixner
Cc: linux-kernel, Bagas Sanjaya, Dang Huynh
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
Hi,
I recently had a discussion about the use of HZ_1000 in the kernel
configuration and the impact on performance.
My reading of the HZ_1000 help text tells me that HZ_1000 is primarily
useful for DAW and other systems where RT capabilities are (most)
important. This is due to "systems requiring fast interactive responses
to events", whereby I put the emphasis on *requiring*.
As *I* understand the rest of the help texts, a higher Hz value can/will
have a negative effect on f.e. IO performance. And I'm not entirely
sure, but it seems each CPU (core?) multiplies the nr of interrupts?
But, doing a ``git blame`` on the choices shows that apart from a
spelling fix in 2025, all the text hasn't changed since 2005/2006.
But a LOT has changed since then. There are more architectures and the
hardware and the kernel itself have changed quite a bit since then.
While the Kconfig.hz default is still HZ_250, the x86 defconfig changed
to HZ_1000 in 5cb04df8d3f0 ("x86: defconfig updates") (in 2008) and
there are various distros which have switched to HZ_1000.
So my questions are: are the Kconfig help text still accurate for
current (hardware) systems and kernels? Is HZ_250 still the most
sensible default? Or is the 'newer' HZ_300 better? Or even HZ_1000?
And does that apply only for x86 or for all architectures?
(distros seem to vary between architectures f.e.)
Cheers,
Diederik
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Is kernel/Kconfig.hz still up-to-date?
2025-04-07 13:27 Is kernel/Kconfig.hz still up-to-date? Diederik de Haas
@ 2025-04-08 16:42 ` Christoph Lameter (Ampere)
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter (Ampere) @ 2025-04-08 16:42 UTC (permalink / raw)
To: Diederik de Haas
Cc: Greg Kroah-Hartman, Andrew Morton, Thomas Gleixner, linux-kernel,
Bagas Sanjaya, Dang Huynh
On Mon, 7 Apr 2025, Diederik de Haas wrote:
> I recently had a discussion about the use of HZ_1000 in the kernel
> configuration and the impact on performance.
> My reading of the HZ_1000 help text tells me that HZ_1000 is primarily
> useful for DAW and other systems where RT capabilities are (most)
> important. This is due to "systems requiring fast interactive responses
> to events", whereby I put the emphasis on *requiring*.
Fast reponses to events can be generated by interrupts and short duration
timers even if you have a low HZ. In general we want a low HZ to reduce
system overhead.
> As *I* understand the rest of the help texts, a higher Hz value can/will
> have a negative effect on f.e. IO performance. And I'm not entirely
> sure, but it seems each CPU (core?) multiplies the nr of interrupts?
Each cpu has its own interrupts. Yes.
> While the Kconfig.hz default is still HZ_250, the x86 defconfig changed
> to HZ_1000 in 5cb04df8d3f0 ("x86: defconfig updates") (in 2008) and
> there are various distros which have switched to HZ_1000.
User land software that does not use kernel synchronization but improvises
its own spinlocks causes these issues. Sadly the desktop apps often do
this and thus benefit from a higher HZ.
> So my questions are: are the Kconfig help text still accurate for
> current (hardware) systems and kernels? Is HZ_250 still the most
> sensible default? Or is the 'newer' HZ_300 better? Or even HZ_1000?
> And does that apply only for x86 or for all architectures?
> (distros seem to vary between architectures f.e.)
HZ 100 is probably a good value. If there are regression in user space
then they are usually related to coding of spinlock functionality in user
space. Better fix user space than cause additional overhead for everyone.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-08 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 13:27 Is kernel/Kconfig.hz still up-to-date? Diederik de Haas
2025-04-08 16:42 ` Christoph Lameter (Ampere)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox