{"id":14176,"date":"2018-01-26T16:08:13","date_gmt":"2018-01-26T16:08:13","guid":{"rendered":"https:\/\/www.firewallhardware.it\/schede-di-rete-soluzioni-ed-ottimizzazioni\/"},"modified":"2023-06-05T17:34:57","modified_gmt":"2023-06-05T15:34:57","slug":"tuning-and-troubleshooting-network-cards","status":"publish","type":"post","link":"https:\/\/blog.miniserver.it\/en\/pfsense\/tuning-and-troubleshooting-network-cards\/","title":{"rendered":"Tuning and Troubleshooting Network Cards"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1123.2px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:0px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-1\"><h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Broadcom bce(4) Cards<\/h3>\n<p>Several users have noted issues with certain Broadcom network cards, especially those built into Dell hardware. If you find that your bce cards are behaving erratically, dropping packets, or causing system crashes, then you may want to apply the following tweaks, especially on amd64.<\/p>\n<p>In \/boot\/loader.conf.local &#8211; Add the following (or create the file if it does not exist):<\/p>\n<p>kern.ipc.nmbclusters=&#8221;131072&#8243;<br \/>\nhw.bce.tso_enable=0<br \/>\nhw.pci.enable_msix=0<\/p>\n<p>That will increase the amount of network memory buffers, disable TSO directly, and disable msix.<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Packet loss with many (small) UDP packets<\/h3>\n<p>If you see a lot of packet loss with UDP on bce cards, you might also try changing the netisr settings. These can be set as system tunables under System &gt; Advanced, on the System Tunables tab. On that page, add two new tunables:<\/p>\n<p>net.isr.direct_force=1<br \/>\nnet.isr.direct=1<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Broadcom bge(4) Cards<\/h3>\n<p>See above, but change &#8220;bce&#8221; to &#8220;bge&#8221; in the setting names.<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Intel igb(4) and em(4) Cards<\/h3>\n<p>Certain intel igb cards, especially multi-port cards, can very easily\/quickly exhaust mbufs and cause panics, especially on amd64. The following tweaks should help:<\/p>\n<p>In \/boot\/loader.conf.local &#8211; Add the following (or create the file if it does not exist):<\/p>\n<p>kern.ipc.nmbclusters=&#8221;131072&#8243;<br \/>\nhw.igb.num_queues=1<\/p>\n<p>That will increase the amount of network memory buffers, and make the card use one queue instead of multiple queues, to reduce the strain on the system.<\/p>\n<p>The same settings can also apply to em(4) cards, just use &#8220;em&#8221; in place of &#8220;igb&#8221; in the setting(s) above.<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Intel ix(4) Cards<\/h3>\n<p>in \/boot\/loader.conf.local<\/p>\n<p>kern.ipc.nmbclusters=&#8221;262144&#8243;<br \/>\nkern.ipc.nmbjumbop=&#8221;262144&#8243;<\/p>\n<p>As a sysctl (system tunable)<\/p>\n<p>hw.intr_storm_threshold=10000<\/p>\n<p>If using VLANs with Intel 10 Gb ix(4) cards, you may need to disable some features of the driver for VLANs to work correctly. For instance, to apply these settings on NIC ix0, run the following.<\/p>\n<p>ifconfig ix0 -vlanhwfilter<\/p>\n<p>That alone should be enough, but in some cases you may also find that you need to disable TSO in addition to VLAN hardware filtering, which can be done like so:<\/p>\n<p>ifconfig ix0 -vlanhwfilter -vlanhwtso -tso<\/p>\n<p>You can place these commands into a shellcmd tag to execute at boot time to make the change persistent.<\/p>\n<h3 style=\"color: #00a0df; font-size: 20px; text-align: left;\">Flow Control<\/h3>\n<p>In some circumstances, you may wish to disable flow control. The exact method of this depends on the hardware involved, but here are a couple examples.<\/p>\n<ul>\n<li>All of these go in \/boot\/loader.conf.local<\/li>\n<li>em (4):\n<ul>\n<li>hw.em.fc_setting = 0<\/li>\n<\/ul>\n<\/li>\n<li>IGB (4):\n<ul>\n<li>hw.igb.fc_setting = 0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>This document comes from <a href=\"https:\/\/doc.pfsense.org\/index.php\/Tuning_and_Troubleshooting_Network_Cards\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Questa guida aiuta gli utenti di pfSense\u00ae CE ad ottimizzare e migliorare le performances del proprio appliances. Tuttavia al momento non ci sono nostri prodotti che necessitano di queste modifiche.<\/p>\n","protected":false},"author":11,"featured_media":22664,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[124],"tags":[138],"class_list":["post-14176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pfsense","tag-pfsense-en"],"_links":{"self":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/14176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/comments?post=14176"}],"version-history":[{"count":4,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/14176\/revisions"}],"predecessor-version":[{"id":28703,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/posts\/14176\/revisions\/28703"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media\/22664"}],"wp:attachment":[{"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/media?parent=14176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/categories?post=14176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.miniserver.it\/en\/wp-json\/wp\/v2\/tags?post=14176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}