All of lore.kernel.org
 help / color / mirror / Atom feed
From: P@draigBrady.com
To: jeremy.guthrie@berbee.com
Cc: netdev@oss.sgi.com
Subject: Re: Linux Policy Routing-Based IDS Load Balancer HOWTO
Date: Tue, 26 Jul 2005 16:09:17 +0100	[thread overview]
Message-ID: <42E6521D.6020601@draigBrady.com> (raw)
In-Reply-To: <200507260946.38894.jeremy.guthrie@berbee.com>

Jeremy M. Guthrie wrote:
> Linux Policy Routing-Based IDS Load Balancer HOWTO

great thanks!

> 4.2.3.1  CPUs should only following one NIC.
> 
>    If you look at the output below you can see that CPU0 is taking the 
> interrupts for eth3.  CPU1 is taking interrupts for eth2 & eth0.  Optimising 
> any system relies on keep thrashing to a minimum.

I recommend you rename these interfaces throughout the doc,
and then you can refer to and write generic scripts against these
known names. For example:

ip link set dev eth2 name ids1
ip link set dev eth3 name ids2

>  As a result I highly 
> recommend disable IRQ Balancing.
> 
>    make menuconfig for your kernel config
>    Select "Processor type and features"
>    Disable "Enable kernel irq balancing"
>    Rebuild your kernel and reboot.
> 
>    You will have to poke around /proc to set which CPU an interrupt binds to.  
> Here is what was used to set the interrupt/CPU bindings down below:
>    echo 01 > /proc/irq/18/smp_affinity
>    echo 02 > /proc/irq/20/smp_affinity
> 
>    The value used is expressed in powers of two.  ie. CPU3 would actually be 
> 04.
> 
>    cat /proc/interrupts
>            CPU0       CPU1
>   0: 3184569581 1789102599    IO-APIC-edge  timer
>   1:       1005        218    IO-APIC-edge  i8042
>   7:          0          0   IO-APIC-level  ohci_hcd
>   8:          1          1    IO-APIC-edge  rtc
>  12:        122         74    IO-APIC-edge  i8042
>  14:          2          0    IO-APIC-edge  ide0
>  18:  995373697       5139   IO-APIC-level  eth3
>  20:          2 1378253801   IO-APIC-level  eth2
>  27:    7542100    9352305   IO-APIC-level  eth0
>  28:    4150402   13187680   IO-APIC-level  aic7xxx
>  30:          0          0   IO-APIC-level  acpi
> NMI:          0          0
> LOC:  679927478  679903506
> ERR:          0
> MIS:          0

As an example of a generic script:

for iface in ids1 ids2; do
     int=`grep $iface\$ /proc/interrupts | cut -d: -f1`
     int=`echo $int` #strip whitespace
     [ "$iface" = "ids1" ] && mask=01 || mask=04
     echo $mask > /proc/irq/$int/smp_affinity
done

> 4.3.3  Basic scripts

I find "watch" very useful, for example:

watch -n1 `ethtool -S ids1`

-- 
Pádraig Brady - http://www.pixelbeat.org
--

      reply	other threads:[~2005-07-26 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 14:46 Linux Policy Routing-Based IDS Load Balancer HOWTO Jeremy M. Guthrie
2005-07-26 15:09 ` P [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42E6521D.6020601@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=jeremy.guthrie@berbee.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.