Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Sep 2009 01:07:34 -0300
From:      Agus <agus.262@gmail.com>
To:        Pieter de Goeje <pieter@degoeje.nl>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Polling and kern.hz
Message-ID:  <fda61bb50909202107r51deee8x7b1d19086ede4873@mail.gmail.com>
In-Reply-To: <200909201413.03882.pieter@degoeje.nl>
References:  <fda61bb50909191316v37959eebr26394e8f2ae52670@mail.gmail.com> <200909201413.03882.pieter@degoeje.nl>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
2009/9/20 Pieter de Goeje <pieter@degoeje.nl>:
> 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
>>
>> options DEVICE_POLLING
>> =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=
he
> 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,=
 it
> is important that the latency is kept as low as possible. That means that=
 you
> must poll the device as often as possible. So generally people use very h=
igh
> HZ values for polling, for example 10000. HZ=3D50 leads to latencies of a=
bout
> 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.....


Cheers,
A



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?fda61bb50909202107r51deee8x7b1d19086ede4873>