<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[NIC&#x27;s irq affects performance]]></title><description><![CDATA[<p dir="auto">I've read topics about performance, pooling, irq. Didn't found the clear answer.</p>
<p dir="auto">Here is the situation:<br />
On board nics have the same irq as installed cards.</p>
<p dir="auto">Could it affect performance? Because the system average throughput is about 10 Mb/s BUT the average processor load is 50%</p>
<h1><a class="anchor-offset" name="vmstat-i"></a>vmstat -i</h1>
<p dir="auto">interrupt                  total                  rate<br />
irq0: clk                    1029813916      1000<br />
irq1: atkbd0                            6              0<br />
irq7: em2 ohci0          24220127            23<br />
irq8: rtc                    131794209          128<br />
irq10: ciss0                  2236992              2<br />
irq11: bge0 em1        583590581          566<br />
irq14: ata0                            80              0<br />
irq15: bge1 em0+    965954416          938</p>
<p dir="auto">Total                        2737610327        2658</p>
<p dir="auto">===========================</p>
<p dir="auto">NICS:</p>
<p dir="auto">bge0: &lt;broadcom bcm5703="" a2,="" asic="" rev.="" 0x1002=""&gt;mem 0xf7cf0000-0xf7cfffff irq 11 at device 1.0 on pci2<br />
miibus0: &lt;mii bus=""&gt;on bge0</p>
<p dir="auto">bge1: &lt;broadcom bcm5703="" a2,="" asic="" rev.="" 0x1002=""&gt;mem 0xf7ce0000-0xf7ceffff irq 15 at device 2.0 on pci2<br />
miibus1: &lt;mii bus=""&gt;on bge1</p>
<p dir="auto">em0: &lt;intel(r) 1000="" pro="" network="" connection="" version="" -="" 6.2.9=""&gt;port 0x4000-0x403f mem 0xf7de0000-0xf7dfffff irq 15 at device 1.0 on pci3</p>
<p dir="auto">em1: &lt;intel(r) 1000="" pro="" network="" connection="" version="" -="" 6.2.9=""&gt;port 0x5000-0x503f mem 0xf7fe0000-0xf7ffffff,0xf7f80000-0xf7fbffff irq 11 at device 1.0 on pci6</p>
<p dir="auto">em2: &lt;intel(r) 1000="" pro="" network="" connection="" version="" -="" 6.2.9=""&gt;port 0x5040-0x507f mem 0xf7f60000-0xf7f7ffff irq 7 at device 1.1 on pci6</p>
<p dir="auto">===========================</p>
<h1><a class="anchor-offset" name="vmstat-5"></a>vmstat 5</h1>
<h1><a class="anchor-offset" name="procs-memory-page-disks-faults-cpu-br-r-b-w-avm-fre-flt-re-pi-po-fr-sr-da0-pa0-in-sy-cs-us-sy-id-br-0-4-0-84196-1940056-469-0-0-1-419-0-0-0-4058-1312-4100-1-18-81-br-0-4-0-84196-1940056-78-0-0-15-69-0-13-0-4839-169-5601-0-15-85-br-0-4-0-84196-1940056-78-0-0-0-70-0-0-0-5877-166-6978-0-16-84"></a>procs      memory      page                    disks    faults      cpu<br />
r b w    avm    fre          flt  re  pi  po  fr    sr da0 pa0  in  sy  cs us sy  id<br />
0 4 0  84196 1940056  469  0  0  1  419  0  0    0 4058  1312 4100  1 18 81<br />
0 4 0  84196 1940056    78  0  0  15  69    0  13  0 4839  169  5601  0 15 85<br />
0 4 0  84196 1940056    78  0  0    0  70    0  0    0 5877  166  6978  0 16 84</h1>
<p dir="auto">Any ideas?&lt;/intel(r)&gt;&lt;/intel(r)&gt;&lt;/intel(r)&gt;&lt;/mii&gt;&lt;/broadcom&gt;&lt;/mii&gt;&lt;/broadcom&gt;</p>
]]></description><link>https://forum.netgate.com/topic/11296/nic-s-irq-affects-performance</link><generator>RSS for Node</generator><lastBuildDate>Mon, 15 Jun 2026 05:05:19 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/11296.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Oct 2008 20:53:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Wed, 15 Oct 2008 15:03:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wallabybob">@<bdi>wallabybob</bdi></a>:</p>
<blockquote>
<p dir="auto">The irq &lt;n&gt;threads are effectively the interrupt handlers doing time critical processing such as allocating another receive buffer to replace now filled buffer holding a received frame. The less time critical processing (probably includes thing such as matching received packets against firewall rules) is handed off to swi1: net.</p>
<p dir="auto">If you don't use USB you might be able to disable all the USB controllers in the BIOS and reduce the interrupt sharing even more by giving em0 sole use of irq 11.&lt;/n&gt;</p>
</blockquote>
<p dir="auto">Thank you for the explanation.</p>
<p dir="auto">I think that we  squeezed all from irq assigning, now I can't see that other devices shares irq with bge1 interface which utilizes most irq. Overall performance is still not satisfy.</p>
<p dir="auto">The following steps are to use Intel 2 port Gigabit card in place of built-in Broadcom one.<br />
And I suppose we have to look at our network activity and how pf handles packets, especially small ones.</p>
]]></description><link>https://forum.netgate.com/post/183345</link><guid isPermaLink="true">https://forum.netgate.com/post/183345</guid><dc:creator><![CDATA[rokka]]></dc:creator><pubDate>Wed, 15 Oct 2008 15:03:33 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Wed, 15 Oct 2008 12:07:44 GMT]]></title><description><![CDATA[<p dir="auto">The irq &lt;n&gt;threads are effectively the interrupt handlers doing time critical processing such as allocating another receive buffer to replace now filled buffer holding a received frame. The less time critical processing (probably includes thing such as matching received packets against firewall rules) is handed off to swi1: net.</p>
<p dir="auto">If you don't use USB you might be able to disable all the USB controllers in the BIOS and reduce the interrupt sharing even more by giving em0 sole use of irq 11.&lt;/n&gt;</p>
]]></description><link>https://forum.netgate.com/post/183329</link><guid isPermaLink="true">https://forum.netgate.com/post/183329</guid><dc:creator><![CDATA[wallabybob]]></dc:creator><pubDate>Wed, 15 Oct 2008 12:07:44 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Tue, 14 Oct 2008 21:34:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wallabybob">@<bdi>wallabybob</bdi></a>:</p>
<blockquote>
<blockquote>
<p dir="auto">I have no idea what else might be on irq 15<br />
If there a way to find it out?</p>
</blockquote>
<p dir="auto">From the shell:</p>
<pre><code># dmesg | grep "irq 15"

```is one way. Or you could just post your full dmesg output. (The startup output doesn't always show the interrupts assigned to all the devices.)
</code></pre>
</blockquote>
<p dir="auto">I checked BIOS, there was same irq on different network interfaces. After I assigned uniq irq to NICs (some of irqs are still shared among NICs and other stuff like USB) - I noticed that box stated to work more efficiently. Reassigning NICs irq has definitely help.</p>
<p dir="auto">Now we have:</p>
<p dir="auto">#vmstat -i<br />
interrupt                          total       rate<br />
irq0: clk                      171322322       1000<br />
irq1: atkbd0                             6             0<br />
irq5: em1                     51624879          301<br />
irq7: bge1                     99709608         582<br />
irq8: rtc                        21925606          128<br />
irq9: em2 acpi0               1551210              9<br />
irq10: bge0                    44770010          261<br />
irq11: em0 ohci0             81789134          477<br />
irq14: ata0                               80             0<br />
irq15: ata1 ciss0                 361285             2<br />
Total                            473054140        2762</p>
<p dir="auto">The rates are the same if sum up irq rates on previously combined interfaces, but now because of each irq is unique then rate is lower. The total load on the processor if 3 times lower according to pfsense graphs… That's very good, but...</p>
<p dir="auto">#top -S</p>
<p dir="auto">last pid:  4611;  load averages:  0.35,  0.18,  0.12              up 1+23:40:47  17:26:22<br />
88 processes:  5 running, 68 sleeping, 1 zombie, 14 waiting<br />
CPU states:  0.0% user,  0.0% nice,  0.0% system, 20.5% interrupt, 79.5% idle<br />
Mem: 41M Active, 10M Inact, 39M Wired, 19M Buf, 1908M Free<br />
Swap: 4096M Total, 4096M Free</p>
<p dir="auto">PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND<br />
   10 root        1 171   52     0K     8K RUN     44.1H  78.71% idle: cpu0<br />
  <strong>11 root        1 -44 -163     0K     8K WAIT    81:38 10.69% swi1: net</strong><br />
   24 root        1 -68 -187     0K     8K RUN     16:08  2.10%   irq11: em0 ohci0<br />
   29 root        1 -68 -187     0K     8K RUN     15:17  1.37%   irq7: bge1<br />
   14 root        1 -16    0      0K      8K -          2:55   0.05%   yarrow<br />
   12 root        1 -32 -151     0K     8K WAIT    18:08  0.00%   swi4: clock sio<br />
   28 root        1 -68 -187     0K     8K WAIT     6:54   0.00%   irq10: bge0<br />
   30 root        1 -68 -187     0K     8K RUN       6:16   0.00%   irq5: em1</p>
<p dir="auto">Hehe, who is the swi1: net??? Quickly checked FreeBsd section on Google and didn't find answer. Any ideas?</p>
]]></description><link>https://forum.netgate.com/post/183278</link><guid isPermaLink="true">https://forum.netgate.com/post/183278</guid><dc:creator><![CDATA[rokka]]></dc:creator><pubDate>Tue, 14 Oct 2008 21:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Sun, 12 Oct 2008 05:02:02 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">I have no idea what else might be on irq 15<br />
If there a way to find it out?</p>
</blockquote>
<p dir="auto">From the shell:</p>
<pre><code># dmesg | grep "irq 15"

```is one way. Or you could just post your full dmesg output. (The startup output doesn't always show the interrupts assigned to all the devices.)</code></pre>
]]></description><link>https://forum.netgate.com/post/183105</link><guid isPermaLink="true">https://forum.netgate.com/post/183105</guid><dc:creator><![CDATA[wallabybob]]></dc:creator><pubDate>Sun, 12 Oct 2008 05:02:02 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Fri, 10 Oct 2008 12:55:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wallabybob">@<bdi>wallabybob</bdi></a>:</p>
<blockquote>
<p dir="auto">What else uses irq 15? The secondary disk controller? usb? (the "+" in the irq 15 line in the vmstat output indicates there are more devices than those listed).</p>
<p dir="auto">Does the system do much disk i/o, e.g. web cache?</p>
</blockquote>
<p dir="auto">I have no idea what else might be on irq 15<br />
If there a way to find it out?</p>
<p dir="auto">cat /etc/defaults/pccard.conf | grep 15</p>
<h1><a class="anchor-offset" name="on-i386-irqs-can-be-any-of-3-4-5-7-9-10-11-12-14-15"></a>on i386 IRQs can be any of 3 4 5 7 9 10 11 12 14 15</h1>
<p dir="auto">irq    3 5 10 11 15</p>
]]></description><link>https://forum.netgate.com/post/183026</link><guid isPermaLink="true">https://forum.netgate.com/post/183026</guid><dc:creator><![CDATA[rokka]]></dc:creator><pubDate>Fri, 10 Oct 2008 12:55:14 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Thu, 09 Oct 2008 22:44:05 GMT]]></title><description><![CDATA[<p dir="auto">What else uses irq 15? The secondary disk controller? usb? (the "+" in the irq 15 line in the vmstat output indicates there are more devices than those listed).</p>
<p dir="auto">Does the system do much disk i/o, e.g. web cache?</p>
]]></description><link>https://forum.netgate.com/post/182970</link><guid isPermaLink="true">https://forum.netgate.com/post/182970</guid><dc:creator><![CDATA[wallabybob]]></dc:creator><pubDate>Thu, 09 Oct 2008 22:44:05 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Thu, 09 Oct 2008 19:38:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wallabybob">@<bdi>wallabybob</bdi></a>:</p>
<blockquote>
<p dir="auto">When devices share an interrupt line, whenever there is an interrupt on that line the system has to call each of the interrupt handlers to see if the corresponding device needs service. So, in your case, whenever there is an interrupt on irq11 the system has to call the handler for bge0 and the handler for em1.  This is additional overhead compared with having a single device on the interrupt line. Suppose em1 is not enabled, then it shouldn't request interrupts but the em1 interrupt handler gets called every time bge0 requests an interrupt.</p>
<p dir="auto">Whether the interrupt sharing makes a big difference depends on interrupt rates and processor speed and how quickly each of the handlers can determine if the corresponding device has requested an interrupt.</p>
<p dir="auto">Sometimes the interrupt lines can be tweaked to some extent in the BIOS - if you play around with the settings you MIGHT be able to reduce the interrupt sharing.</p>
<p dir="auto">Whether 50% CPU load is reasonable for 10Mb/s throughput depends on CPU type and speed and whatever else you have running in the system. The top command ('top -S' to see system processes) can be useful for seeing what processes are big CPU consumers.</p>
<p dir="auto">Lots of complex firewall rules could also be costly in CPU time especially if typical packets end up having to be checked against many rules.</p>
<p dir="auto">My pfSense runs on a 800MHz VIA C3 CPU and has over 95% idle time (reported by top) when downloading a 13MB file at about 60kB/s.</p>
<p dir="auto">I'm curious why you say <em>average processor load is 50%</em> when the vmstat output you provided shows an idle time of over 80%.</p>
</blockquote>
<p dir="auto">Thanks for explanation.</p>
<p dir="auto">Just to make sure, how unusual load on our server and if it is related to irqs on NICs. Let me to list some statistics.</p>
<h1><a class="anchor-offset" name="dmesg"></a>dmesg</h1>
<p dir="auto">Copyright <img src="https://forum.netgate.com/assets/plugins/nodebb-plugin-emoji/emoji/android/00a9.png?v=717669fab53" class="not-responsive emoji emoji-android emoji--copyright" style="height:23px;width:auto;vertical-align:middle" title="©" alt="©" /> 1992-2007 The FreeBSD Project.<br />
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994<br />
The Regents of the University of California. All rights reserved.<br />
FreeBSD is a registered trademark of The FreeBSD Foundation.<br />
FreeBSD 6.2-RELEASE-p11 #0: Sun Feb 24 16:49:14 EST 2008<br />
    sullrich@builder6.pfsense.com:/usr/obj.pfSense/usr/src/sys/pfSense_SMP.6<br />
Timecounter "i8254" frequency 1193182 Hz quality 0<br />
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2789.37-MHz 686-class CPU)<br />
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9<br />
  Features=0xbfebf9ff &lt;fpu,vme,de,pse,tsc,msr,pae,mce,cx8,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe&gt;Features2=0x4400&lt;cntx-id,&lt;b14&gt;&gt;<br />
  Logical CPUs per core: 2<br />
real memory  = 2147459072 (2047 MB)<br />
avail memory = 2092097536 (1995 MB)</p>
<h1><a class="anchor-offset" name="netstat-a-w-10-h"></a>netstat -A -w 10 -h</h1>
<p dir="auto">input        (Total)          output<br />
  packets  errs      bytes    packets  errs      bytes colls<br />
      42K    0      9.9M        43K    0        18M    0<br />
      47K    0      7.6M        45K    0        14M    0<br />
      50K    0      8.0M        47K    0        14M    0<br />
      55K    0      9.6M        52K    0        17M    0</p>
<p dir="auto">Current throughput is 10.4 Mb/s from pfsense stat page.</p>
<p dir="auto">#top -S</p>
<p dir="auto">last pid: 63725;  load averages:  0.81,  0.48, 0.38<br />
up 12+20:50:21  15:17:39<br />
87 processes:  3 running, 68 sleeping, 1 zombie, 15 waiting<br />
CPU states:  0.0% user,  0.0% nice,  3.7% system, 67.9% interrupt, 28.4% idle<br />
Mem: 32M Active, 13M Inact, 50M Wired, 26M Buf, 1905M Free<br />
Swap: 4096M Total, 4096M Free</p>
<p dir="auto">PID USERNAME  THR PRI NICE  SIZE    RES STATE    TIME  WCPU COMMAND<br />
  23 root        1 -68 -187    0K    8K RUN    37.4H    43.07% irq15: bge1 em0+<br />
  10 root        1 171  52    0K    8K RUN      249.2H  38.53% idle:  cpu0<br />
  11 root        1 -44 -163    0K    8K WAIT    576:03  6.69%  swi1: net<br />
  37 root        1 171  52    0K    8K pgzero  9:06    0.34%  pagezero</p>
<p dir="auto">43.07% irq15: bge1 em0+ is that the case?&lt;/cntx-id,&lt;b14&gt;&lt;/fpu,vme,de,pse,tsc,msr,pae,mce,cx8,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe&gt;</p>
]]></description><link>https://forum.netgate.com/post/182959</link><guid isPermaLink="true">https://forum.netgate.com/post/182959</guid><dc:creator><![CDATA[rokka]]></dc:creator><pubDate>Thu, 09 Oct 2008 19:38:21 GMT</pubDate></item><item><title><![CDATA[Reply to NIC&#x27;s irq affects performance on Thu, 09 Oct 2008 11:45:36 GMT]]></title><description><![CDATA[<p dir="auto">When devices share an interrupt line, whenever there is an interrupt on that line the system has to call each of the interrupt handlers to see if the corresponding device needs service. So, in your case, whenever there is an interrupt on irq11 the system has to call the handler for bge0 and the handler for em1.  This is additional overhead compared with having a single device on the interrupt line. Suppose em1 is not enabled, then it shouldn't request interrupts but the em1 interrupt handler gets called every time bge0 requests an interrupt.</p>
<p dir="auto">Whether the interrupt sharing makes a big difference depends on interrupt rates and processor speed and how quickly each of the handlers can determine if the corresponding device has requested an interrupt.</p>
<p dir="auto">Sometimes the interrupt lines can be tweaked to some extent in the BIOS - if you play around with the settings you MIGHT be able to reduce the interrupt sharing.</p>
<p dir="auto">Whether 50% CPU load is reasonable for 10Mb/s throughput depends on CPU type and speed and whatever else you have running in the system. The top command ('top -S' to see system processes) can be useful for seeing what processes are big CPU consumers.</p>
<p dir="auto">Lots of complex firewall rules could also be costly in CPU time especially if typical packets end up having to be checked against many rules.</p>
<p dir="auto">My pfSense runs on a 800MHz VIA C3 CPU and has over 95% idle time (reported by top) when downloading a 13MB file at about 60kB/s.</p>
<p dir="auto">I'm curious why you say <em>average processor load is 50%</em> when the vmstat output you provided shows an idle time of over 80%.</p>
]]></description><link>https://forum.netgate.com/post/182924</link><guid isPermaLink="true">https://forum.netgate.com/post/182924</guid><dc:creator><![CDATA[wallabybob]]></dc:creator><pubDate>Thu, 09 Oct 2008 11:45:36 GMT</pubDate></item></channel></rss>