public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* excessive interrupts on network cards
@ 2001-09-25 19:20 Chris Newton
  2001-09-25 20:01 ` Andrew Morton
  2001-09-25 20:36 ` Tim Moore
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Newton @ 2001-09-25 19:20 UTC (permalink / raw)
  To: linux-kernel

Hi,

  I 'think' the number of interrupts being generated for the network traffic I 
monitor, is excessive.  Having talked quikly with Donald Becker, he indicated 
that I should be seeing a little less than the number of RX/TX packets/s on a 
wire, in terms of interrupts/s.  That, however, is not what I am seeing.  I am 
seeing 3 times as many interrupts/s as I am seeing packets/s.

  I have used three network devices to look at the stream I am monitoring, and 
it is usually aorund 5K packet/s IN, and 5K out, fed full duplex into a single 
3Com 3c982 (2.4.10 kernel reports that anyways).  However, watching:

 'procinfo -D', reports on the order of 30,000 interrupts per second.

  This page:

  http://www.scyld.com/network/3c509.html

  has a snipet:

  "some other device or device driver hogging the bus or disabling interrupts. 
Check /proc/interrupts for excessive interrupt counts. The timer tick 
interrupt should always be incrementing faster than the others. "

  Well, looking at this machine, since it booted 57 minutes ago:


[root@phantom /proc]# more interrupts
           CPU0       CPU1
  0:     172754     171041    IO-APIC-edge  timer
  1:          0          3    IO-APIC-edge  keyboard
  2:          0          0          XT-PIC  cascade
 14:          2          2    IO-APIC-edge  ide0
 16:      87361      87539   IO-APIC-level  eth2
 20:    6798697    6799977   IO-APIC-level  eth0
 21:          0          0   IO-APIC-level  eth1
 30:      11837      11806   IO-APIC-level  aic7xxx
 31:     199418     199209   IO-APIC-level  aic7xxx
NMI:          0          0
LOC:     343669     343708
ERR:          0
MIS:          0


  In 57 minutes, that ethernet card has generated: 14,000,459 interrupts.

  Isn't this excessive?

  I also have a different brand card on board...  an intel ether express pro.  
So... I swapped the cables so that the intel card would see that network 
stream.    Well, it caused even more interrupts per second. (more like 40K).


  I have tried kernel 2.4.9, 2.4.2 (redhat 7.1 version), and just now, 2.4.10, 
all SMP builds, on a dual 1 GHz PIII, with 1 GB of SDRAM, Adaptec 7899 
Ultra160 controller, two 3c982 netcards and one onboard intel etherexpress pro 
100 cards.

  Guess my question is, first of.. is this normal? 


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: excessive interrupts on network cards
@ 2001-09-25 21:38 Chris Newton
  2001-09-25 21:42 ` Benjamin LaHaise
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Newton @ 2001-09-25 21:38 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Yea, it is a single port card... I had meant to mention that in the email I 
sent out...  ie: that it wasn't reporting correctly... but, I didnt really 
think it was related, since the eepro was doing the same thing.

  As for comparing with ifconfig, I ran 'watch 1 ifconfig -a', and sure 
enough, I have about ~7000-7500 packets coming in right now.  And, the 
'procinfo -D', reports ~21000-22000 interrupts per second.

  Other sources I have used to confirm packet rate... include output from 
'sniffer', a flow generator that was monitoring that link, and the hub this 
machine is plugged into.

  the hub has 3 active ports.. port 1 is one side of our internet conenction 
(out to our provider), port 2 was from the hub over to our main router... port 
3 is a mirror of the IN on port 1 and the OUT on port 2 to port 3.  Comparing, 
and verifying, showed port 3 getting 10K packets (this afternoon, which 
obviously drops at night, which it is here now), and down to 7K now.

Chris


>===== Original Message From Andrew Morton <akpm@zip.com.au> =====
>Chris Newton wrote:
>>
>> Hi,
>>
>>   I 'think' the number of interrupts being generated for the network 
traffic I
>> monitor, is excessive.  Having talked quikly with Donald Becker, he 
indicated
>> that I should be seeing a little less than the number of RX/TX packets/s on 
a
>> wire, in terms of interrupts/s.  That, however, is not what I am seeing.  I 
am
>> seeing 3 times as many interrupts/s as I am seeing packets/s.
>>
>>   I have used three network devices to look at the stream I am monitoring, 
and
>> it is usually aorund 5K packet/s IN, and 5K out, fed full duplex into a 
single
>> 3Com 3c982 (2.4.10 kernel reports that anyways).  However, watching:
>
>3c982 is a dual-port server NIC.  Is your card dual-port?  If not, it's 
probably
>a 3c980, and I goofed :)
>
>>  'procinfo -D', reports on the order of 30,000 interrupts per second.
>
>That does sound rather high.  You should compare the interrupt rate
>with the packet rate from `ifconfig' or /proc/net/dev.
>
>Normally, 3c59x will show approx three Tx packets per interrupt
>and one Rx packet per interrupt.  It varies with workload, but
>it tends to vary in the "good" direction - at higher packet
>rates, we do more work in a single interrupt and the interrupt-per-packet
>rate falls.


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: excessive interrupts on network cards
@ 2001-09-25 22:32 Chris Newton
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Newton @ 2001-09-25 22:32 UTC (permalink / raw)
  To: Benjamin LaHaise; +Cc: Andrew Morton, linux-kernel

Even once I get this current problem worked out, I'd be interested in testing 
something along these lines.  I'm working to build a nice, fast network 
monitor, and so, the performance of the box under high traffic load is very 
important.

  Are these changes totally related to the card you are using, or can they be 
applied more generally to other cards?

Chris

>===== Original Message From Benjamin LaHaise <bcrl@redhat.com> =====
>On Tue, Sep 25, 2001 at 06:38:31PM -0300, Chris Newton wrote:
>> Yea, it is a single port card... I had meant to mention that in the email I
>> sent out...  ie: that it wasn't reporting correctly... but, I didnt really
>> think it was related, since the eepro was doing the same thing.
>>
>>   As for comparing with ifconfig, I ran 'watch 1 ifconfig -a', and sure
>> enough, I have about ~7000-7500 packets coming in right now.  And, the
>> 'procinfo -D', reports ~21000-22000 interrupts per second.
>
>This is heavily dependant on the interrupt mitigation features that a card
>has.  At least for the ns83820 driver, I'm testing a technique where the
>driver essentially switches to polled mode once the interrupt load goes
>above a certain threshold, thereby limiting the load to ~2500 irq/sec.
>Combined with carefully placed data prefetching, I'm seeing a huge increase
>in performance.  Of course, this comes at the expense of latency.
>
>		-ben
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-09-25 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-25 19:20 excessive interrupts on network cards Chris Newton
2001-09-25 20:01 ` Andrew Morton
2001-09-25 20:36 ` Tim Moore
  -- strict thread matches above, loose matches on Subject: below --
2001-09-25 21:38 Chris Newton
2001-09-25 21:42 ` Benjamin LaHaise
2001-09-25 22:32 Chris Newton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox