Re: SMP on IBM eseriesand amd64

"Berk D. Demir" <[email protected]> Mon, 12 Jun 2006 11:34:03 +0300
Newsgroups gmane.os.openbsd.smp
Message-ID <[email protected]>
Lukas Macura wrote:
> Thank you to your answer, now I know that it has no sense to compile
> some new kernels and spend my time :)
> 
> Our machine is used as firewall, so we really need to pin irqs to both
> cpu and to utilise both CPUs. 
> 
> In this situation, we do not achieve even 100mbit throughput :( Do you
> think it is normal? Is there any other optimalization ? Is ther
> possibility to use first cpu for kernel and interrupts and second for
> applications? Now only one cpu is utilized.. 

100mbit is an easy goal to achive with even small PCs.

If you use MP kernel, APIC support is enabled and interrupt load on the 
CPU decreases dramatically. Using MP kernel even on uniprocessor systems 
offloads the interrupt load.

If you're not using a very low quality ethernet adapter, it'll be very 
much possible to handle ~400mbit/s traffic or ~60K pkts/s loads with 
uniprocessor but APIC enabled workstations.

Use the command "systat vmstat" and watch the interrupts columns on the 
right. It'll display your network adapter's interrupts. Look for it's 
iface name. (em0, sk0, bge0, etc.)

Normalization, modulation and other features of PF can create 
significant CPU load. To get detailed info about PF status, use the 
command "pfctl -vvvs i"

"congestion" is your enemy. If it keeps going up, you're probably using 
a crappy network adapter or your switch (you're not using hubs eh?) is 
malfunctioning.

To avoid congestion you can bump "net.inet.ip.ifq.maxlen" to a value 
your interface card can handle. I'm using value of 250 for em(4) cards 
which are generally "Intel PRO/1000MT Dual Port Server Adapter (PWLA8492MT)"

Blindly bumping the number won't help but worsen the situation. I'm not 
an expert on network adapter specs. so you have to search it for yourself.

Anyway, if you could reproduce the hogged scenario and post here the 
outputs of recently mentioned commands, maybe we can find a clue.

Hope this helps,
bdd