Skip to contentSkip to conversation

The "best" value of HZ

DISCUSSION Claudio Scordino 8 participants 8 messages Oct 27, 2005 – Oct 28, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

during the last years there has been a lot of discussion about the "best"
value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Thanks,

Claudio

#1 lore raw

yes, our Blackfin CPU (from Analog Device) is team interested in
it. Dynamically modify HZ will be useful when we evaluate the performance.

Quoted 26 lines · Claudio Scordino

Hi,

during the last years there has been a lot of discussion about the "best"
value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Thanks,

Claudio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Claudio Scordino
Quoted 7 lines · On Fri, 28 Oct 2005 01:18:41 +0200 Claudio Scordino wrote:

Hi,

during the last years there has been a lot of discussion about the "best"
value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Quoted 7 lines

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Do you think there would be much work to do that ?

Not a lot. Could be useful.

Quoted 2 lines

Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

In this thread (around 2005-july-14)
Subject: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt there was some interest in that, and the beginnings of a patch. But the dynamic tick patch seems to have sidelined this one.

---
~Randy

#3 lore raw
In reply to Claudio Scordino
Quoted 13 lines · Claudio Scordino

Hi,

during the last years there has been a lot of discussion about the
"best" value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Quoted 3 lines

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Google for "dynticks". There's obviously an overhead associated with HZ not being a constant (the compiler cannot optimise many expressions), but the feature is being worked on nonetheless.

Signature · 6 lines
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
#4 lore raw
Quoted 14 lines · Alistair John Strachan
Quoted 13 lines · Claudio Scordino

Hi,

during the last years there has been a lot of discussion about the
"best" value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Quoted 8 lines
Quoted 3 lines

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Google for "dynticks". There's obviously an overhead associated with HZ not being a constant (the compiler cannot optimise many expressions), but the feature is being worked on nonetheless.

Well Linus had the best idea in that thread (as usual) which was to implement "dynamic ticks" by leaving HZ a constant, setting it to a high value, and skipping ticks when idle. Has there been any work in that direction?

Lee

#5 lore raw
Quoted 24 lines · Lee Revell
Quoted 14 lines · Alistair John Strachan
Quoted 13 lines · Claudio Scordino

Hi,

during the last years there has been a lot of discussion about the
"best" value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Quoted 8 lines
Quoted 3 lines

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Google for "dynticks". There's obviously an overhead associated with HZ not being a constant (the compiler cannot optimise many expressions), but the feature is being worked on nonetheless.

Quoted 5 lines

Well Linus had the best idea in that thread (as usual) which was to implement "dynamic ticks" by leaving HZ a constant, setting it to a high value, and skipping ticks when idle. Has there been any work in that direction?

i did a bit of work in that area, but the stuff I came up with never seemed to work right, so I dropped it.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

#6 lore raw
Quoted 24 lines · Jesper Juhl
Quoted 23 lines · Lee Revell
Quoted 21 lines · Alistair John Strachan
Quoted 13 lines · Claudio Scordino

Hi,

during the last years there has been a lot of discussion about
the "best" value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Quoted 3 lines

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

Google for "dynticks". There's obviously an overhead associated with HZ not being a constant (the compiler cannot optimise many expressions), but the feature is being worked on nonetheless.

Quoted 7 lines
Quoted 4 lines

Well Linus had the best idea in that thread (as usual) which was to implement "dynamic ticks" by leaving HZ a constant, setting it to a high value, and skipping ticks when idle. Has there been any work in that direction?

i did a bit of work in that area, but the stuff I came up with never seemed to work right, so I dropped it.

It's all still in development at the moment but not far from being available again. We stood back a bit to make some structural changes before trying to make it ready for prime time.

Cheers,
Con

#7 lore raw
In reply to Claudio Scordino
Quoted 1 line · Claudio Scordino

Hi,

Hi Claudio,

Quoted 11 lines

during the last years there has been a lot of discussion about the "best"
value of HZ... On i386 was 100, then became 1000, and finally was set to 250. I'm thinking to do an evaluation of this parameter using different architectures.

Has anybody thought to give the possibility to modify the value of HZ at boot time instead of at compile time ? This would allow to easily test different values on different machines and create a table containing the "best" value for each architecture... At this moment, instead, we have to recompile the kernel for each different value :(

Quoted 3 lines

Do you think there would be much work to do that ?
Do you think it would be a desired feature the knowledge of the best value for each architecture with more precision ?

the best value for HZ is not architecture specific, it depends on the usage pattern.

The rule is roughly:
- low HZ for computations
- high HZ for interactive usage

Making HZ selectable at boot time wouldn't be hard, but I doubt it's worth it because it would make the kernel both bigger and slower.

Quoted 3 lines

Thanks,

Claudio

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed