Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Sep 2009 01:07:34 -0300
From:      Agus <>
To:        Pieter de Goeje <>
Subject:   Re: Polling and kern.hz
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
2009/9/20 Pieter de Goeje <>:
> On Saturday 19 September 2009, Agus wrote:
>> Hi guys...
>> Im reading ant playing with polling and kernel..... I read that
>> polling increase net performance and i plan on using it... Now the
>> question that arises is.. is polling and performance in general
>> affected by the value of kern.hz? i have put in /boot.loader.con
>> kern.hz=3D50 and was wondering if this number affects the number i
>> choose for the polling options
>> I wanna recompile kernel using
>> =A0options HZ=3D1000
>> So that 1000hz how affects the system? if it affects it at all........
>> thanks for anyone who can give me a hint....
>> Cheers,
>> A
> To quote polling(4):
> "Device polling disables interrupts by polling devices at appropriate
> times, i.e., on clock interrupts and within the idle loop. =A0This way, t=
> context switch overhead is removed. =A0Furthermore, the operating system
> can control accurately how much work to spend in handling device events,
> and thus prevent livelock by reserving some amount of CPU to other tasks.=
> HZ affects how often the device is polled. For high bandwidth situations,=
> is important that the latency is kept as low as possible. That means that=
> must poll the device as often as possible. So generally people use very h=
> HZ values for polling, for example 10000. HZ=3D50 leads to latencies of a=
> 20ms, way too high for normal network I/O.
> Note that you can change HZ without recompiling by specifying kern.hz=3D"=
###" in
> loader.conf.
> --
> Pieter de Goeje

Thanks for the answer... I've been reading and find that i was
confused... i thought that those hz where only for polling but i found
that they are actually for the whole system clock... so now my doubt
is if it will be better to activate polling and leave hz in 1000, or
download hz to lets say 50 so i dont have too many context switches
due to clock interrupts... I will try to test load changing only those
parameters and come back with my results..... If u guys know any perf
tester suitable for this please share..hehe... i will use iperf and
will look for a web perf app.....


Want to link to this message? Use this URL: <>