<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inliniac &#187; sysctl</title>
	<atom:link href="http://www.inliniac.net/blog/tag/sysctl/feed" rel="self" type="application/rss+xml" />
	<link>http://www.inliniac.net/blog</link>
	<description>Everything inline.</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:38:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Improving Snort_inline&#8217;s NFQ performance</title>
		<link>http://www.inliniac.net/blog/2008/01/23/improving-snort_inlines-nfq-performance.html</link>
		<comments>http://www.inliniac.net/blog/2008/01/23/improving-snort_inlines-nfq-performance.html#comments</comments>
		<pubDate>Wed, 23 Jan 2008 15:27:29 +0000</pubDate>
		<dc:creator>Victor Julien</dc:creator>
				<category><![CDATA[Snort_inline]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[nfqueue]]></category>
		<category><![CDATA[sysctl]]></category>

		<guid isPermaLink="false">http://www.inliniac.net/blog/2008/01/23/improving-snort_inlines-nfq-performance.html</guid>
		<description><![CDATA[When using Snort_inline with NFQ support, it&#8217;s likely that at some point you&#8217;ve seen messages like these on the console: packet recv contents failure: No buffer space available. When the messages are appearing Snort_inline slows down significantly. I&#8217;ve been trying to find out why. There are a number of setting that influence NFQ performance. One [...]]]></description>
			<content:encoded><![CDATA[<p>When using Snort_inline with NFQ support, it&#8217;s likely that at some point you&#8217;ve seen messages like these on the console: <em>packet recv contents failure: No buffer space available</em>. When the messages are appearing Snort_inline slows down significantly. I&#8217;ve been trying to find out why.</p>
<p>There are a number of setting that influence NFQ performance. One of them is the NFQ queue maximum length. This is a value in packets. Snort_inline takes an argument to modify the buffer length: &#8211;queue-maxlen 5000 (note: there are two dashes before queue-maxlen).</p>
<p align="left">That&#8217;s not enough though. The following settings increase the buffer that NFQ seems to use for it&#8217;s queue. Since I&#8217;ve set it this high, I haven&#8217;t been able to get a single read error anymore:</p>
<blockquote><p>sysctl -w net.core.rmem_default=&#8217;8388608&#8242;<br />
sysctl -w net.core.wmem_default=&#8217;8388608&#8242;</p></blockquote>
<p>The values are in bytes. The following values increase buffers for tcp traffic.</p>
<blockquote><p>sysctl -w net.ipv4.tcp_wmem=&#8217;1048576 4194304 16777216&#8242;<br />
sysctl -w net.ipv4.tcp_rmem=&#8217;1048576 4194304 16777216&#8242;</p></blockquote>
<p align="left">For more details see this page: <a href="http://www-didc.lbl.gov/TCP-tuning/linux.html" target="_blank">http://www-didc.lbl.gov/TCP-tuning/linux.html</a></p>
<p>Setting these values fixed all my NFQ related slowdowns. The values probably work for ip_queue as well. If you use other values, please put them in a comment below.</p>
<p>Thanks to Dave Remien for helping me track this down!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.inliniac.net/blog/2008/01/23/improving-snort_inlines-nfq-performance.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
