Chris Kuethe wrote:
On 5/29/07, Leon <[EMAIL PROTECTED]> wrote:
Hi,
I'm new to OpenBSD and I'm trying to setup a traffic shaping router
using pf
and altq. The question I want to ask is: Can the kernel interrupt
timer be
increased from 100 hz? and if so how do I do that? I though there
would have
been a sysctl tunable variable like kern.hz that could do this. I read
somewhere that altq operates best when the clock interrupts are at
1000hz
Where did you read that altq works better with a 1kHz clock - I have
zero deployments of altq where I've found myself saying "gosh, I wish
I had finer timers". 100Hz works plenty good enough. I've seen
otherwise capable machines be crippled by people who thought that 1kHz
or faster was a good idea...
Also, this hackathon we've been making pf (and the network stack in
general) go faster by having fewer interrupts. So, yes, the clock rate
can be increased. It is left as an exercise to the reader to do so. It
is further left as an exercise to prove that this is desirable.
CK
I worked on a commercial product based on altq on which a 1KHz clock was
very useful. This used slow (400MHz) Pentium-class CPUs, and the
increase in system overhead over a 100Hz clock was approximately 2%.
Without the fast clock, accurately and consistently managing bandwidth
down to 1% slices was difficult. I'm sure the systems you saw which were
crippled by a fast clock had some hidden configuration problems which if
fixed could have reduced the overhead significantly.
I agree that reducing the number of interrupts is almost always a good
thing. If that reduction increases latency significantly it almost
always makes system throughput worse and increases demand for buffers,
etc. Reducing the number of external (PCI, etc.) bus references in
drivers can make an astonishing speedup, sometimes 10% of total
interrupt processing time per reference.