<?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>Cloudiquity &#187; ulimit</title>
	<atom:link href="http://www.cloudiquity.com/tag/ulimit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cloudiquity.com</link>
	<description>A blog about Cloud, Grid and HPC technologies</description>
	<lastBuildDate>Wed, 14 Jul 2010 12:22:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>EC2 Linux Monitoring &amp; Tuning Tips</title>
		<link>http://www.cloudiquity.com/2009/07/ec2-linux-monitoring-tuning/</link>
		<comments>http://www.cloudiquity.com/2009/07/ec2-linux-monitoring-tuning/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 23:52:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[TCP_FIN]]></category>
		<category><![CDATA[ulimit]]></category>

		<guid isPermaLink="false">http://www.cloudiquity.com/?p=401</guid>
		<description><![CDATA[When deploying on EC2 even though Amazon provides the hardware infrastructure, you still need to tune your instances operating system and monitor your application. You should review your hardware/software requirements and review your application design and deployment strategy
The Operating System
Change ulimit
&#8216;ulimit&#8217; Specifies the number of open files that are supported. If the value set for [...]]]></description>
			<content:encoded><![CDATA[<p>When deploying on EC2 even though Amazon provides the hardware infrastructure, you still need to tune your instances operating system and monitor your application. You should review your hardware/software requirements and review your application design and deployment strategy</p>
<h2><span style="text-decoration: underline;">The Operating System</span></h2>
<h3>Change ulimit</h3>
<p>&#8216;ulimit&#8217; Specifies the number of open files that are supported. If the value set for this parameter is too low, a file open error, memory allocation failure, or connection establishment error might be displayed. By default this is set to 1024 , normally you should increase this to at least 8096.</p>
<p>Issue the following command to set the value.</p>
<pre>ulimit -n 8096</pre>
<p>Use the ulimit -a command to display the current values for all limitations on system resources<br />
<br/></p>
<h2><span style="text-decoration: underline;">Tune the Network</span></h2>
<p>A good in detail reference for Linux IP tuning is <a href="http://ipsysctl-tutorial.frozentux.net/ipsysctl-tutorial.html ">here</a>.  Some of the  important parameters to change  for distributed applications are below:</p>
<h3>TCP_FIN_TIMEOUT</h3>
<p>The tcp_fin_timeout variable tells kernel how long to keep sockets in the state FIN-WAIT-2 if you were the one closing the socketThis value takes an integer value which is per default set to 60 seconds. To set the value to 30  issue the command</p>
<pre>echo 30 &gt; /proc/sys/net/ipv4/tcp_fin_timeout</pre>
<h3>TCP_KEEPALIVE_INTERVAL</h3>
<p>The tcp_keepalive_intvl variable tells the kernel how long to wait for a reply on each keepalive probe. This value is in other words extremely important when you try to calculate how long time will go before your connection will die a keepalive death. The variable takes an integer value and the default value is 75 seconds. To set the value to 15 issue the following command</p>
<pre>echo 15 &gt; /proc/sys/net/ipv4/tcp_keepalive_intvl</pre>
<h3>TCP_KEEPALIVE_PROBES</h3>
<p>The tcp_keepalive_probes variable tells the kernel how many TCP keepalive probes to send out before it decides a specific connection is broken.<br />
This variable takes an integer value, The default value is to send out 9 probes before telling the application that the connection is broken. To change the valueto 5  use the following command.</p>
<pre>echo 5 &gt; /proc/sys/net/ipv4/tcp_keepalive_probes</pre>
<p> <br/></p>
<h2><span style="text-decoration: underline;">Monitoring</span></h2>
<p>You can monitor the system resources using command line but to make life easier you can use monitoring systems.  Couple of free opensource monitoring tools that we use</p>
<ul>
<li><a href="http://ganglia.info/">Ganglia</a> a free monitoring system</li>
<li><a href="http://www.hyperic.com/">Hyperic</a> they have both a commercial and free offering</li>
</ul>
<p> <br/></p>
<h2><span style="text-decoration: underline;">Logging</span></h2>
<p>You will be amazed how few projects care about logging until they have hit a problem. Have a consistent logging procedure in place to collect the logs from different machines to troubleshot in case of a problem<br />
<br/></p>
<h2><span style="text-decoration: underline;">Linux Commands</span></h2>
<p>Some linux command that we use regulary to you might find useful. More details can be found <a href="http://vehera.jsn-server7.com/LiddleBlog/?p=202">here</a>, <a href="http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html">here</a> and <a href="http://www.linuxmanpages.com">here</a></p>
<ul>
<li> <strong>top</strong>: display Linux tasks</li>
<li> <strong>vmstat</strong> Report virtual memory statistics</li>
<li> <strong>free</strong> Display amount of free and used memory in the system</li>
<li> <strong>netstat</strong> Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships</li>
<li> <strong>ps </strong>Report a snapshot of the current processes</li>
<li> <strong>iostat</strong> Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions</li>
<li> <strong>sar</strong> Collect, report, or save system activity information</li>
<li> <strong>tcpdump</strong> dump traffic on a network</li>
<li> <strong>strace </strong>trace system calls and signals</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudiquity.com/2009/07/ec2-linux-monitoring-tuning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
