<?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"
	>

<channel>
	<title>Linux Blog &#187; Linux tips</title>
	<atom:link href="http://www.linuxblog.org/category/linux-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxblog.org</link>
	<description>Linux server and open source blog</description>
	<pubDate>Tue, 19 Aug 2008 05:55:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>ReiserFS for scalable and high load SMTP servers</title>
		<link>http://www.linuxblog.org/reiserfs-for-scalable-and-high-load-smtp-servers/</link>
		<comments>http://www.linuxblog.org/reiserfs-for-scalable-and-high-load-smtp-servers/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 02:07:03 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
		
		<category><![CDATA[Linux servers]]></category>

		<category><![CDATA[Linux tips]]></category>

		<guid isPermaLink="false">http://www.linuxblog.org/?p=5</guid>
		<description><![CDATA[We have seen great performance on using ReiserFS for mail system spools and in our tests ReiserFS file system spool for Postfix queues was very fast. For best performance we used
notail, noatime mount options in /etc/fstab file.
Full example:
/dev/sda2/usr reiserfs notail,noatime,rw,auto 0 0
notatime - turns off atimes calls, reduces IO and greatly increases file system performance
notail [...]]]></description>
			<content:encoded><![CDATA[<p>We have seen great performance on using ReiserFS for mail system spools and in our tests ReiserFS file system spool for Postfix queues was very fast. For best performance we used</p>
<p><em>notail</em>, <em>noatime</em> mount options in <em>/etc/fstab</em> file.</p>
<p>Full example:</p>
<p><em>/dev/sda2/usr reiserfs notail,noatime,rw,auto 0 0</em></p>
<p><strong>notatime</strong> - turns off atimes calls, reduces IO and greatly increases file system performance<br />
<strong>notail</strong> - increases performance of ReiserFS especially for small files - works great for mail servers, web servers and caches. This option disables file pckaging in tree.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxblog.org/reiserfs-for-scalable-and-high-load-smtp-servers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Iptable ip_conntrack table set-up and tunning for high load UDP traffic</title>
		<link>http://www.linuxblog.org/iptable-ip_conntrack-table-set-up-and-tunning-for-high-load-udp-traffic/</link>
		<comments>http://www.linuxblog.org/iptable-ip_conntrack-table-set-up-and-tunning-for-high-load-udp-traffic/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 21:24:10 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
		
		<category><![CDATA[Linux tips]]></category>

		<guid isPermaLink="false">http://www.linuxblog.org/iptable-ip_conntrack-table-set-up-and-tunning-for-high-load-udp-traffic/</guid>
		<description><![CDATA[If you run a busy DNS server or any other service that uses a lot of UDP traffic, it&#8217;s possible that your default Iptable conntrack sessions (connection tracking entries in kernel memory) settings are too low and netfilter is unable to track all your sessions.
The error is usually something like this:
Sep 20 11:53:44 hostname01 kernel: [...]]]></description>
			<content:encoded><![CDATA[<p>If you run a busy DNS server or any other service that uses a lot of UDP traffic, it&#8217;s possible that your default Iptable conntrack sessions (connection tracking entries in kernel memory) settings are too low and netfilter is unable to track all your sessions.</p>
<p>The error is usually something like this:</p>
<p><em>Sep 20 11:53:44 hostname01 kernel: ip_conntrack: table full, dropping packet.</em></p>
<p>You need to tune sysctl net.ipv4.ip_conntrack_max value, let&#8217;s say increase it twice or more times and see if you still get the error messages on the console or syslog.</p>
<p>Depending on your OS, the formula for calculating the maximum number of conntrack sessions your box can handle is as follows:</p>
<p>The size of each session record really depends on the kernel config and many other compile options. For 2.6.* kernels it is around 300 bytes.</p>
<p>You can also easily check out the current usage of connection tracking</p>
<p><em>wc -l /proc/net/ip_conntrack</em></p>
<p>Default sysctl settings for Red Hat Enterprise boxes, possible the same applies for Fedora and Centos.</p>
<p>net.ipv4.netfilter.ip_conntrack_tcp_max_retrans = 3<br />
net.ipv4.netfilter.ip_conntrack_tcp_be_liberal = 0<br />
net.ipv4.netfilter.ip_conntrack_tcp_loose = 3<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_max_retrans = 300<br />
net.ipv4.netfilter.ip_conntrack_log_invalid = 0<br />
net.ipv4.netfilter.ip_conntrack_generic_timeout = 600<br />
net.ipv4.netfilter.ip_conntrack_icmp_timeout = 30<br />
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream = 180<br />
net.ipv4.netfilter.ip_conntrack_udp_timeout = 30<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_close = 10<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 120<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_last_ack = 30<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait = 60<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 120<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 432000<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 60<br />
net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_sent = 120<br />
net.ipv4.netfilter.ip_conntrack_checksum = 1<br />
net.ipv4.netfilter.ip_conntrack_buckets = 8192<br />
net.ipv4.netfilter.ip_conntrack_count = 18988<br />
net.ipv4.netfilter.ip_conntrack_max = 34576</p>
<p>You can decrease the net.ipv4.netfilter.ip_conntrack_tcp_timeout_established, by half, at least.</p>
<p><em>sysctl -w net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=216000</em></p>
<p>I hope this helps you with your Linux server network stack tunning. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxblog.org/iptable-ip_conntrack-table-set-up-and-tunning-for-high-load-udp-traffic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Improving Linux network stack</title>
		<link>http://www.linuxblog.org/improving-linux-network-stack/</link>
		<comments>http://www.linuxblog.org/improving-linux-network-stack/#comments</comments>
		<pubDate>Tue, 22 May 2007 13:31:27 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
		
		<category><![CDATA[Linux tips]]></category>

		<guid isPermaLink="false">http://www.linuxblog.org/improving-linux-network-stack/</guid>
		<description><![CDATA[The settings for sysctl.conf below apply for Fedora, RedHat, Centos OS as well as other Linux flavors. These settings will improve your server network stack and some little protection against ddos attacks as well. Feel free to improve as you wish :)
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is [...]]]></description>
			<content:encoded><![CDATA[<p>The settings for sysctl.conf below apply for Fedora, RedHat, Centos OS as well as other Linux flavors. These settings will improve your server network stack and some little protection against ddos attacks as well. Feel free to improve as you wish :)</p>
<p># Kernel sysctl configuration file for Red Hat Linux<br />
#<br />
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and<br />
# sysctl.conf(5) for more details.</p>
<p># Disables packet forwarding<br />
net.ipv4.ip_forward=0</p>
<p># Disables IP source routing<br />
net.ipv4.conf.all.accept_source_route = 0<br />
net.ipv4.conf.lo.accept_source_route = 0<br />
net.ipv4.conf.eth0.accept_source_route = 0<br />
net.ipv4.conf.default.accept_source_route = 0</p>
<p># Enable IP spoofing protection, turn on source route verification<br />
net.ipv4.conf.all.rp_filter = 1<br />
net.ipv4.conf.lo.rp_filter = 1<br />
net.ipv4.conf.eth0.rp_filter = 1<br />
net.ipv4.conf.default.rp_filter = 1</p>
<p># Disable ICMP Redirect Acceptance<br />
net.ipv4.conf.all.accept_redirects = 0<br />
net.ipv4.conf.lo.accept_redirects = 0<br />
net.ipv4.conf.eth0.accept_redirects = 0<br />
net.ipv4.conf.default.accept_redirects = 0</p>
<p># Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets<br />
net.ipv4.conf.all.log_martians = 0<br />
net.ipv4.conf.lo.log_martians = 0<br />
net.ipv4.conf.eth0.log_martians = 0</p>
<p># Disables IP source routing<br />
net.ipv4.conf.all.accept_source_route = 0<br />
net.ipv4.conf.lo.accept_source_route = 0<br />
net.ipv4.conf.eth0.accept_source_route = 0<br />
net.ipv4.conf.default.accept_source_route = 0</p>
<p># Enable IP spoofing protection, turn on source route verification<br />
net.ipv4.conf.all.rp_filter = 1<br />
net.ipv4.conf.lo.rp_filter = 1<br />
net.ipv4.conf.eth0.rp_filter = 1<br />
net.ipv4.conf.default.rp_filter = 1</p>
<p># Disable ICMP Redirect Acceptance<br />
net.ipv4.conf.all.accept_redirects = 0<br />
net.ipv4.conf.lo.accept_redirects = 0<br />
net.ipv4.conf.eth0.accept_redirects = 0<br />
net.ipv4.conf.default.accept_redirects = 0</p>
<p># Disables the magic-sysrq key<br />
kernel.sysrq = 0</p>
<p># Decrease the time default value for tcp_fin_timeout connection<br />
net.ipv4.tcp_fin_timeout = 15</p>
<p># Decrease the time default value for tcp_keepalive_time connection<br />
net.ipv4.tcp_keepalive_time = 400</p>
<p># Turn off the tcp_window_scaling<br />
net.ipv4.tcp_window_scaling = 0</p>
<p># Turn off the tcp_sack<br />
net.ipv4.tcp_sack = 0</p>
<p># Turn off the tcp_timestamps<br />
net.ipv4.tcp_timestamps = 0</p>
<p># Enable TCP SYN Cookie Protection<br />
net.ipv4.tcp_syncookies = 1</p>
<p># Lower syn retry rates<br />
net.ipv4.tcp_synack_retries = 2<br />
net.ipv4.tcp_syn_retries = 3</p>
<p># Enable ignoring broadcasts request<br />
net.ipv4.icmp_echo_ignore_broadcasts = 1</p>
<p># Enable bad error message Protection<br />
net.ipv4.icmp_ignore_bogus_error_responses = 1</p>
<p># Log Spoofed Packets, Source Routed Packets, Redirect Packets<br />
net.ipv4.conf.all.log_martians = 1</p>
<p># Increases the size of the socket queue (effectively, q0).<br />
net.ipv4.tcp_max_syn_backlog = 1024</p>
<p># Increase the tcp-time-wait buckets pool size<br />
net.ipv4.tcp_max_tw_buckets = 1440000</p>
<p># Allowed local port range<br />
net.ipv4.ip_local_port_range = 16384 65536</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxblog.org/improving-linux-network-stack/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
