Skip to contentSkip to conversation

tickless and HZ=1000 throughput advantage?

DISCUSSION Daniel J Blueman 4 participants 6 messages Sep 19, 2009 – Sep 20, 2009

lore
Share & tools
lore
#0 lore raw

On tickless kernels, is the general consensus that for non-embedded systems, selecting HZ=1000 gives slightly more throughput in particular situations than HZ=100 or 250, due to finer timer intervals/granularity?

(low HZ used to cause problems with low-rate QoS packet queues when timer scheduling was selected)

Thanks,
Daniel

Signature · 1 line
Daniel J Blueman
#1 lore raw
Quoted 4 lines · On Sat, 19 Sep 2009 15:47:24 +0100 Daniel J Blueman <[email protected]>…

On tickless kernels, is the general consensus that for non-embedded systems, selecting HZ=1000 gives slightly more throughput in particular situations than HZ=100 or 250, due to finer timer intervals/granularity?

it's not about throughput. It's about latency for some things.... although now that select/poll and co use hrtimers it's not as critical anymore.

the HZ timers aren't used much for anything time-critical nowadays.

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#2 lore raw
Quoted 8 lines · Arjan van de Ven
Quoted 4 lines · On Sat, 19 Sep 2009 15:47:24 +0100 Daniel J Blueman <[email protected]>…

On tickless kernels, is the general consensus that for non-embedded systems, selecting HZ=1000 gives slightly more throughput in particular situations than HZ=100 or 250, due to finer timer intervals/granularity?

Quoted 5 lines

it's not about throughput. It's about latency for some things.... although now that select/poll and co use hrtimers it's not as critical anymore.

the HZ timers aren't used much for anything time-critical nowadays.

Agreed. Do you think there is still a small case for moving to HZ=1000 (given it's effectively free) in situations like:

jiffies_to_transmit = port->baud?(1 + charsleft * 10 * HZ / port->baud):0;

<applying plausible figures>
(gdb) p (1 + 10 * 10 * 1000 / 38400) * 1
$3 = 3
(gdb) p (1 + 10 * 10 * 250 / 38400) * 4
$5 = 4

-> HZ=250 causes a 33% longer sleep than expected

perhaps?

Signature · 1 line
Daniel J Blueman
#3 lore raw
Quoted 2 lines · Daniel J Blueman

Agreed. Do you think there is still a small case for moving to HZ=1000 (given it's effectively free) in situations like:

Sure HZ=1000 gives you more accurate sleeps, that's kind of the point, but since when has it been "effectively free"?
http://lwn.net/Articles/331607/

	--Ben.
#4 lore raw
Quoted 8 lines · Ben Nizette
Quoted 2 lines · Daniel J Blueman

Agreed. Do you think there is still a small case for moving to HZ=1000 (given it's effectively free) in situations like:

Sure HZ=1000 gives you more accurate sleeps, that's kind of the point, but since when has it been "effectively free"?
http://lwn.net/Articles/331607/

i'd be curious, what effect does it have on userspace applications? like, does it effect the wakeup latency of userspace (pthread) mutexes/conditions or posix semaphores?

thnx, tim

Signature · 6 lines
[email protected]
http://tim.klingt.org

Desperation is the raw material of drastic change. Only those who can
leave behind everything they have ever believed in can hope to escape.
  William S. Burroughs
#5 lore raw
Quoted 6 lines · On Sun, 20 Sep 2009 09:34:30 +0200 Tim Blechmann <[email protected]> wrote:
Quoted 5 lines · Ben Nizette
Quoted 2 lines · Daniel J Blueman

Agreed. Do you think there is still a small case for moving to HZ=1000 (given it's effectively free) in situations like:

Quoted 7 lines
Quoted 3 lines

Sure HZ=1000 gives you more accurate sleeps, that's kind of the point, but since when has it been "effectively free"?
http://lwn.net/Articles/331607/

i'd be curious, what effect does it have on userspace applications? like, does it effect the wakeup latency of userspace (pthread) mutexes/conditions or posix semaphores?

the impact to userspace should be zero nowadays since select/poll/etc moved to hrtimers, which are HZ-independent.

Signature · 3 lines
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org