
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.thelinuxwiki.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=netfilter_notes</id>
		<title>netfilter notes - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=netfilter_notes"/>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=netfilter_notes&amp;action=history"/>
		<updated>2026-04-29T00:15:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.5</generator>

	<entry>
		<id>http://www.thelinuxwiki.com/index.php?title=netfilter_notes&amp;diff=1198&amp;oldid=prev</id>
		<title>Nighthawk: Created page with &quot;==performance== ===multi-core=== taken from [https://stackoverflow.com/questions/7467688/netfilter-hooks-on-multi-core-system Netfilter hooks on multi-core system]  The proble...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=netfilter_notes&amp;diff=1198&amp;oldid=prev"/>
				<updated>2018-09-26T12:28:05Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==performance== ===multi-core=== taken from [https://stackoverflow.com/questions/7467688/netfilter-hooks-on-multi-core-system Netfilter hooks on multi-core system]  The proble...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==performance==&lt;br /&gt;
===multi-core===&lt;br /&gt;
taken from [https://stackoverflow.com/questions/7467688/netfilter-hooks-on-multi-core-system Netfilter hooks on multi-core system]&lt;br /&gt;
&lt;br /&gt;
The problem is not from netfilter, is the way your kernel is managing interrupts.&lt;br /&gt;
&lt;br /&gt;
By default old versions of APIC delivers all interrupts to the CPU0.&lt;br /&gt;
&lt;br /&gt;
You can check if this is your problem with:&lt;br /&gt;
&lt;br /&gt;
 cat /proc/interrupts&lt;br /&gt;
&lt;br /&gt;
You can see if the interrupts of the NIC (and remember that the netfilter hook are executed over a RX or TX SoftIRQ) are handled by a single Core.&lt;br /&gt;
&lt;br /&gt;
In newer versions of the kernel, there is a compile option (CONFIG_HOTPLUG_CPU), wich balances the IRQ's over the existing cores.&lt;br /&gt;
&lt;br /&gt;
Or if you cannot update the version or recompile the kernel, you can update the SMP affinity (with a mask that handles more that a CPUid) to try to balance between different Cores. Or go into ACPI and proper configuration (Here I cannot help more).&lt;br /&gt;
&lt;br /&gt;
Here you can find all about this stuff (SMP affininty and proper IRQ handling)&lt;br /&gt;
===contracks and kernel 3.15===&lt;br /&gt;
[http://netoptimizer.blogspot.com/2014/04/full-scalability-for-netfilter.html Full scalability for Netfilter conntracks]&lt;br /&gt;
&lt;br /&gt;
My scalability fixes for Netfilter connection tracking have reached Linus'es tree and will appear in kernel release v3.15.&lt;br /&gt;
&lt;br /&gt;
Netfilter’s conntrack have had a bad reputation for being slow. While this was true in the &amp;quot;early-days&amp;quot;, it have been offering excellent scalability for established conntracks for a long time now.  Matching against existing conntrack entries is very fast and completely scalable. (The conntrack system actually does lockless RCU (Read-Copy Update) lookups for existing connections).&lt;br /&gt;
&lt;br /&gt;
The conntrack system have had a scalability problem when it comes to creating (or deleting) connections, for a long time now (single central spinlock).  This scalability issue is now fixed.&lt;br /&gt;
&lt;br /&gt;
This work relates to my recent efforts of using conntrack for DDoS protection, as e.g. SYN-floods would hit this &amp;quot;new&amp;quot; connection scalability problem with Netfilter conntracks.&lt;br /&gt;
&lt;br /&gt;
Finally version 3 of the patchset were accepted March 7th 2014 (note Eric Dumazet worked on the first attempts back in May 9th 2013). The most important commit is 93bb0ceb75 &amp;quot;netfilter: conntrack: remove central spinlock nf_conntrack_lock&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[category:netfilter]]&lt;br /&gt;
[[category:iptables]]&lt;/div&gt;</summary>
		<author><name>Nighthawk</name></author>	</entry>

	</feed>