<?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>Kudithipudi.Org &#187; HOWTO</title>
	<atom:link href="http://kudithipudi.org/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://kudithipudi.org</link>
	<description>Too much time on hand!!!</description>
	<lastBuildDate>Tue, 22 May 2012 13:11:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Project PaaS : Day 2 on Google App Engine</title>
		<link>http://kudithipudi.org/2012/05/03/project-paas-day-2-on-google-app-engine/</link>
		<comments>http://kudithipudi.org/2012/05/03/project-paas-day-2-on-google-app-engine/#comments</comments>
		<pubDate>Fri, 04 May 2012 04:31:14 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1424</guid>
		<description><![CDATA[It looks like I was able to accomplish writing the application that I wanted to on the App Engine in 2 days!!  at least in it&#8217;s basic form.  After some help from Google, I updated the application I created yesterday (http://samurai-apps.appspot.com/) to display the User Agent string being sent by the client. The code has [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like I was able to accomplish writing the <a href="http://kudithipudi.org/2012/05/01/2012-may-project/">application</a> that I wanted to on the App Engine in 2 days!!  at least in it&#8217;s basic form.  After some help from Google, I updated the application I created yesterday (<a href="http://samurai-apps.appspot.com/">http://samurai-apps.appspot.com/</a>) to display the User Agent string being sent by the client.</p>
<p>The code has been updated to github at <a href="https://github.com/kudithipudi/google-app-engine/">https://github.com/kudithipudi/google-app-engine/</a></p>
<p>Lessons from day 2?</p>
<ul>
<li>Python doesn&#8217;t like tabs <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Always use spaces to ident. I was using Notepad++ as the editor and it automatically puts tabs when you hit enter. Why? Looks like that is the best practice according to this style guide (<a href="http://www.python.org/dev/peps/pep-0008/">http://www.python.org/dev/peps/pep-0008/</a>)</li>
<li>The &#8220;Logs&#8221; console in the SDK toolkit should be your best friend. It let&#8217;s you know if there is any error in your code and what line it believes the error is at.</li>
</ul>
<p>Next, I will try to pretty it up a bit.</p>
<p>Isn&#8217;t it amazing that I was able to create a simple app in a matter of 2 days and host it on an &#8220;infinitely&#8221; scalable  platform without even taking our my credit card.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/05/03/project-paas-day-2-on-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Configure Jboss to not show backend server name when proxying https (ssl) traffic</title>
		<link>http://kudithipudi.org/2012/04/30/how-to-configure-jboss-to-not-show-backend-server-name-when-proxying-https-ssl-traffic/</link>
		<comments>http://kudithipudi.org/2012/04/30/how-to-configure-jboss-to-not-show-backend-server-name-when-proxying-https-ssl-traffic/#comments</comments>
		<pubDate>Tue, 01 May 2012 00:32:34 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1415</guid>
		<description><![CDATA[Phew.. that was a long title .  Was running into an issue with the setup shown in the picture below When we try to access the web site using https, the html content being served back was showing the app server name as the reference, rather than the web site. So in this example, let&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Phew.. that was a long title <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .  Was running into an issue with the setup shown in the picture below <img class="aligncenter" title="Web App Proxy Setup" src="http://farm8.staticflickr.com/7261/6985879760_2748debcfe_o_d.png" alt="" width="480" height="133" /></p>
<p>When we try to access the web site using https, the html content being served back was showing the app server name as the reference, rather than the web site.</p>
<p>So in this example, let&#8217;s say the web address was kudithipudi.org and the app server was app-server-kudithipudi, the HTML content was showing https://app-server-kudithipudi:8080 as the source.</p>
<p>Here&#8217;s how, we fixed it.</p>
<p>Edit the server.xml file found in $JBOSS_HOME/server/$JBOSS_PROFILE/deploy/jboss-web.deployer and update the HTTPS connector to use the web address (kudithipudi.org) as the proxyName.</p>
<p><strong>BEFORE</strong></p>
<pre class="brush: plain; title: ; notranslate">&lt;Connector port=&quot;8443&quot; protocol=&quot;HTTP/1.1&quot; SSLEnabled=&quot;true&quot;
maxThreads=&quot;250&quot; scheme=&quot;https&quot; secure=&quot;true&quot;
clientAuth=&quot;false&quot; sslProtocol=&quot;TLS&quot;
keystoreFile=&quot;/opt/jboss/jboss-as/server/kudithipudi/conf/ssl/kudithipudi.keystore&quot;
keystorePass=&quot;xxxxxx&quot; /&gt;
</pre>
<p><strong>AFTER</strong></p>
<pre class="brush: plain; title: ; notranslate">&lt;Connector port=&quot;8443&quot; protocol=&quot;HTTP/1.1&quot; SSLEnabled=&quot;true&quot;
maxThreads=&quot;250&quot; scheme=&quot;https&quot; secure=&quot;true&quot;
clientAuth=&quot;false&quot; sslProtocol=&quot;TLS&quot;
proxyName=&quot;kudithipudi.org&quot; proxyPort=&quot;443&quot;
keystoreFile=&quot;/opt/jboss/jboss-as/server/kudithipudi/conf/ssl/kudithipudi.keystore&quot;
keystorePass=&quot;xxxxxx&quot; /&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/30/how-to-configure-jboss-to-not-show-backend-server-name-when-proxying-https-ssl-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : grep options to display before and after lines of matching content</title>
		<link>http://kudithipudi.org/2012/04/29/how-to-grep-options-to-display-before-and-after-lines-of-matching-content/</link>
		<comments>http://kudithipudi.org/2012/04/29/how-to-grep-options-to-display-before-and-after-lines-of-matching-content/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 13:59:51 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1408</guid>
		<description><![CDATA[For my own notes.. if you are using grep to parse through the contents of a file and want to see the preceding or proceeding content than the line that matched your query, you can use the following options preceding content for example, if I was searching for kudithipudi in a file names access.log and [...]]]></description>
			<content:encoded><![CDATA[<p>For my own notes.. if you are using grep to parse through the contents of a file and want to see the preceding or proceeding content than the line that matched your query, you can use the following options</p>
<p><strong>preceding content</strong>
<pre class="brush: plain; title: ; notranslate">grep -B NUMBER_OF_LINES_TO_DISPLAY query filename</pre>
<p>for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines prior to the match, I would use
<pre class="brush: plain; title: ; notranslate">grep -B 2 kudithipudi access.log</pre>
<p><strong>proceeding content</strong>
<pre class="brush: plain; title: ; notranslate">grep -A NUMBER_OF_LINES_TO_DISPLAY query filename</pre>
<p>for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines after the match, I would use
<pre class="brush: plain; title: ; notranslate">grep -A 2 kudithipudi access.log</pre>
<p><strong>preceding and proceeding content</strong>
<pre class="brush: plain; title: ; notranslate">grep -C NUMBER_OF_LINES_TO_DISPLAY query filename</pre>
<p>for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines before and after the match, I would use
<pre class="brush: plain; title: ; notranslate">grep -C 2 kudithipudi access.log</pre>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/29/how-to-grep-options-to-display-before-and-after-lines-of-matching-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Use templates in puppet to pass hostnames</title>
		<link>http://kudithipudi.org/2012/04/26/how-to-use-templates-in-puppet-to-pass-hostnames/</link>
		<comments>http://kudithipudi.org/2012/04/26/how-to-use-templates-in-puppet-to-pass-hostnames/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 03:00:46 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1404</guid>
		<description><![CDATA[puppet, is a configuration management framework that can be used to perform several different things to validate/configure your infrastructure. We have been using puppet for sometime at my work and have just started moving into some of the advanced uses of the tool. One of the features offered by puppet is the capability to use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://puppetlabs.com/">puppet</a>, is a configuration management framework that can be used to perform several different things to validate/configure your infrastructure. We have been using puppet for sometime at my work and have just started moving into some of the advanced uses of the tool.</p>
<p>One of the features offered by puppet is the capability to use templates to configure different servers.</p>
<p>For example, say you want to configure an application on server ABCD, XYZ and 123. And the configuration file for all these servers is the same, other than the hostname of the server. The configuration file has to reside in /opt/application/config.conf . The config.xml file looks like this</p>
<pre class="brush: plain; title: ; notranslate">

db.name=blah
db.user=blahblah
db.hostname=XYZ
log.level=ERROR
log.location=/var/log/application
</pre>
<p>Here is how you can do it in puppet.</p>
<p>Define a module which uses a template and then configure the template to put the host specific entry in the template. Let&#8217;s name our module test_config</p>
<ul>
<li>Create the module</li>
</ul>
<ul>
<ul>
<li>cd $PUPPET_HOME/modules</li>
<li>mkdir test_config/{files,manifests,templates}</li>
</ul>
<li>Create the template</li>
<ul>
<li>cd templates</li>
<li>vi config.conf.template and add the following to the file
<pre class="brush: plain; title: ; notranslate">db.name=blah
db.user=blahblah
db.hostname=&lt;%= fqdn %&gt;
log.level=ERROR
log.location=/var/log/application </pre>
</li>
<ul>
<li>note : see how I replaced the hostname XYZ, which was specific to one server with &lt;%= fqdn %&gt;. This is one of the &#8220;facts&#8221; provided by puppet. you can get a list of all the facts by running facter on any of the puppet clients.</li>
</ul>
</ul>
<li>Configure the module to use the template. In this case, we want the module to place the file config.conf in /opt/application</li>
<ul>
<li>cd manifests</li>
<li>vi init.pp and add the following to the file
<pre class="brush: plain; title: ; notranslate">class test_config {
file { &quot;/opt/application/config.conf&quot;:
ensure =&gt; present,
owner =&gt; appuser,
group =&gt; appuser,
mode =&gt; 755,
content =&gt; template(&quot;test_config/config.conf.template&quot;),
}
}</pre>
</li>
<ul>
<li>note : There are several other options you can use for the class file.. I just gave an example of some of the common ones. Like setting the owner, group and the rights.</li>
</ul>
</ul>
<li>Finally configure the clients to use the module. In the individual node config files, include the module you just created. Here is how the config for node ABCD would look like
<pre class="brush: plain; title: ; notranslate">node ABCD {
include test_config
}</pre>
</li>
</ul>
<p>The next time the puppet client runs on host ABCD, it would create the file /opt/application/config.conf with the right hostname in the config file.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/26/how-to-use-templates-in-puppet-to-pass-hostnames/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HOW TO : Configure Jboss to append log files instead of overwriting them</title>
		<link>http://kudithipudi.org/2012/04/25/how-to-configure-jboss-to-append-log-files-instead-of-overwriting-them/</link>
		<comments>http://kudithipudi.org/2012/04/25/how-to-configure-jboss-to-append-log-files-instead-of-overwriting-them/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 16:26:52 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1411</guid>
		<description><![CDATA[If you use the default logging options for Jboss, it has a nasty habit of overwriting log files on a restart. So, if you were in the middle of troubleshooting an issue and had to restart Jboss, you will end up loosing all the historic data. You can change this default behavior by changing one [...]]]></description>
			<content:encoded><![CDATA[<p>If you use the default logging options for Jboss, it has a nasty habit of overwriting log files on a restart. So, if you were in the middle of troubleshooting an issue and had to restart Jboss, you will end up loosing all the historic data. You can change this default behavior by changing one option in the log4j config file</p>
<ul>
<li>Edit the $JBOSS_HOME/server/$JBOSS_PROFILE/conf/jboss-log4j.xml and replace
<pre class="brush: plain; title: ; notranslate">&lt;param name=&quot;Append&quot; value=&quot;false&quot;/&gt;</pre>
<p>with
<pre class="brush: plain; title: ; notranslate">&lt;param name=&quot;Append&quot; value=&quot;true&quot;/&gt;</pre>
</li>
<li>You don&#8217;t even have to restart Jboss for this new setting to take place, since Jboss reads the log4j config every 60 seconds and updates the logging parameters accordingly.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/25/how-to-configure-jboss-to-append-log-files-instead-of-overwriting-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Uptime : Recap</title>
		<link>http://kudithipudi.org/2012/04/20/project-uptime-recap/</link>
		<comments>http://kudithipudi.org/2012/04/20/project-uptime-recap/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 02:29:07 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1391</guid>
		<description><![CDATA[Final post on Project Uptime. Before I go into the details of how well I fared against the original goals, here is a screenshot of the uptime of the site for the last two weeks.. Hope I can keep that number for the rest of this year . Recap of the original goals and their [...]]]></description>
			<content:encoded><![CDATA[<p>Final post on Project Uptime. Before I go into the details of how well I fared against the original goals, here is a screenshot of the uptime of the site for the last two weeks.. Hope I can keep that number for the rest of this year <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . <img class="aligncenter" title="2012 : Kudithipudi : Uptime" src="http://farm6.staticflickr.com/5198/7097776839_d3fe20c771_d.jpg" alt="" width="499" height="500" />Recap of the original goals and their status</p>
<p><span style="color: #008000;">GOAL</span> : Move to a fresh <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/pricing/">VM</a> with the <a href="http://samsaffron.com/archive/2012/03/01/why-upgrading-your-linux-kernel-will-make-your-customers-much-happier">latest kernel</a></p>
<ul>
<li>STATUS : This was successfully completed. Details of the install are <a href="http://kudithipudi.org/2012/03/07/project-uptime-progress-report-1/">here</a> and <a href="http://kudithipudi.org/2012/03/20/project-uptime-progress-report-2/">here</a>.</li>
</ul>
<p><span style="color: #008000;">GOAL</span> : Upgrade to the latest version of <a href="http://httpd.apache.org/">Apache</a>.</p>
<ul>
<li>STATUS : Although I didn&#8217;t install 2.4 version of Apache as planned, I was able to get similar (or better) performance by installing varnish as a caching engine. Details of thee apache/varnish install are <a href="http://kudithipudi.org/2012/04/02/project-uptime-progress-report-5-getting-ready-for-reddit-and-hacker-news/">here</a>.</li>
</ul>
<p><span style="color: #008000;">GOAL</span> : Upgrade to latest version of <a href="http://mysql.com/">MySQL</a> and tune it for memory usage</p>
<ul>
<li>STATUS : This was probably the easiest part of the project. Details of the install are <a href="http://kudithipudi.org/2012/03/28/project-uptime-progress-report-3/">here</a>. I didn&#8217;t necessarily tweak it for low memory usage though.</li>
</ul>
<p><span style="color: #ff0000;">GOAL</span> : Configure <a href="http://www.cloudflare.com/">cloudflare</a> to serve a static version of front page, in case the server goes down. Design the static page to point people to my other digital presences (<a href="https://plus.google.com/107691341586252309757">Google+</a>, <a href="http://www.linkedin.com/in/kudithipudi">LinkedIn</a>, <a href="http://flickr.com/kudithipudi">Flickr</a> etc)</p>
<ul>
<li>STATUS : Cloudflar doesn&#8217;t have the capability to direct static pages if the origin server is down. At least not for the free tier. I also didn&#8217;t design a simple page to host my digital presence. Will try to find a good template for it down the road.</li>
</ul>
<p>All in all.. not bad <img src='http://kudithipudi.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/20/project-uptime-recap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Uptime : Progress Report 7 : Putting the finishing touches</title>
		<link>http://kudithipudi.org/2012/04/18/project-uptime-progress-report-7-putting-the-finishing-touches/</link>
		<comments>http://kudithipudi.org/2012/04/18/project-uptime-progress-report-7-putting-the-finishing-touches/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 06:24:47 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1383</guid>
		<description><![CDATA[We finally come to one of the last posts of Project Uptime. Now that all the components have been setup, I finally copied the wordpress directory from my old server to the new one. The only changes, I had to make after copying the files were Configure Apache to have the wordpress folder as the [...]]]></description>
			<content:encoded><![CDATA[<p>We finally come to one of the last posts of <a href="http://kudithipudi.org/2012/03/05/project-uptime/">Project Uptime</a>. Now that all the components have been setup, I finally copied the wordpress directory from my old server to the new one. The only changes, I had to make after copying the files were</p>
<ol>
<li>Configure Apache to have the wordpress folder as the default directory. I did this by changing the DocumentRoot option in the vhost</li>
<li>Changed the permissions on the wordpress directories (so that wordpress can make rewrite rule changes on the fly)</li>
</ol>
<pre class="brush: plain; title: ; notranslate">sudo chmod -v 664 $WORDPRESS_DIRECTORY/.htaccess

sudo chmod 755 $WORDPRESS_DIRECTORY/wp-content </pre>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/18/project-uptime-progress-report-7-putting-the-finishing-touches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Configure Jboss to use hugepages in RHEL/CentOS</title>
		<link>http://kudithipudi.org/2012/04/17/how-to-configure-jboss-to-use-hugepages-in-rhelcentos/</link>
		<comments>http://kudithipudi.org/2012/04/17/how-to-configure-jboss-to-use-hugepages-in-rhelcentos/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 22:23:42 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1374</guid>
		<description><![CDATA[Most of us worry about paging to disk (swap), but if you are running a transaction intensive application the paging that happens in RAM also starts to impact the application performance. This happens due to the size of the &#8220;block&#8221; that is used to store data in memory. Hugepages allows you to store the data [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us worry about paging to disk (swap), but if you are running a transaction intensive application the paging that happens in RAM also starts to impact the application performance. This happens due to the size of the &#8220;block&#8221; that is used to store data in memory. Hugepages allows you to store the data in bigger blocks, hence reducing the need to page while interacting with the data.</p>
<p>Here is how you can enable hugepages and configure jboss (actually any Java app) to use hugepages on a RHEL/CentoOS system.</p>
<p><strong>OS CONFIGURATION</strong></p>
<ol>
<li>Check if your system is capable of supporting hugepages by running
<pre class="brush: plain; title: ; notranslate">grep HUGETLB /boot/config-`uname -r`</pre>
<p>If you see the response as below, you should be good
<pre class="brush: plain; title: ; notranslate">CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
</pre>
</li>
</ol>
<ul>
<li>Next check if huge pages are already being used by running
<pre class="brush: plain; title: ; notranslate">cat /proc/sys/vm/nr_hugepages </pre>
</li>
</ul>
<ol>
<li>If the response is anything other than 0, that means hugepages have already been configured.</li>
</ol>
<ul>
<li>Find the block size for hugepages by running
<pre class="brush: plain; title: ; notranslate">cat /proc/meminfo | grep -i hugepagesize </pre>
</li>
<li>Calculate the amount of memory you want to dedicate to hugepages. (note: memory allocated to hugepages cannot be used by other processes in the system, unless they are configured to use it)</li>
</ul>
<ol>
<li>For example, I want to dedicate 3GB of RAM for hugepages. So the number of hugepages would be
<pre class="brush: plain; title: ; notranslate">(3*1024*1024)/2048</pre>
</li>
</ol>
<ul>
<li>Configure the number of hugepages on the system by editing the /etc/sysctl.conf and adding the option
<pre class="brush: plain; title: ; notranslate">vm.nr_hugepages = 1536</pre>
<p>(note: I put in 1536 since that was the value I got from the above example)</li>
<li>Restart the server and check if hugepages has been enabled by running
<pre class="brush: plain; title: ; notranslate">cat /proc/meminfo | grep -i huge </pre>
</li>
</ul>
<ol>
<li>You should see something like this
<pre class="brush: plain; title: ; notranslate">AnonHugePages:    839680 kB
HugePages_Total:    1500
HugePages_Free:     1500
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
</pre>
</li>
</ol>
<p><strong>JBOSS CONFIGURATION</strong></p>
<ol>
<li>At this point your system is configured with hugepages and any application that is configured to use them can leverage them.  In this example, we want to configure Jboss to utilize these hugepages</li>
<li>Add the groupid of the user that Jboss is running under to the /etc/sysctl.conf file. In my case, the jboss user group had a GID of 505, so I added this line to /etc/sysctl.conf
<pre class="brush: plain; title: ; notranslate">vm.hugetlb_shm_group = 505 </pre>
</li>
<li>Next allocate the memory to the user by editing /etc/security/limits.conf and allocating the memory. Again, in my case, I added the following to /etc/security/limits.conf
<pre class="brush: plain; title: ; notranslate"># Allocate memory for Jboss user to take advantage of hugepages
jboss   soft    memlock 1500
jboss   hard    memlock 1500
</pre>
</li>
<li>Finally add the following to the Jboss startup parameters. I edited the $JBOSS_HOME/bin/run.sh file. (note: the startup file can be different based on your config) with the option
<pre class="brush: plain; title: ; notranslate"> -XX:+UseLargePages</pre>
</li>
<li>Restart Jboss and you are good to go</li>
</ol>
<p>note : A lot articles that I read online say that hugepages are effective when you are allocating large amounts of RAM to the application. The use case of just using 3GB above was just that.. a use case.</p>
<p>While I cannot personally vouch for it, a lot of users have noted that they saw &gt;2 fold increase in performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/17/how-to-configure-jboss-to-use-hugepages-in-rhelcentos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO : Install RPM packages without checking gpg key</title>
		<link>http://kudithipudi.org/2012/04/16/how-to-install-rpm-packages-without-checking-pgp-key/</link>
		<comments>http://kudithipudi.org/2012/04/16/how-to-install-rpm-packages-without-checking-pgp-key/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 22:07:58 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1364</guid>
		<description><![CDATA[This is on RHEL and CentOS distros. If you want to install packages without checking the GPG key (hope you know why you are doing this!!), here is the command line option]]></description>
			<content:encoded><![CDATA[<p>This is on RHEL and CentOS distros. If you want to install packages without checking the GPG key (hope you know why you are doing this!!), here is the command line option</p>
<pre class="brush: plain; title: ; notranslate">sudo yum install package_to_install --nogpgcheck </pre>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/16/how-to-install-rpm-packages-without-checking-pgp-key/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOW TO : Sync git clients across workstations using dropbox</title>
		<link>http://kudithipudi.org/2012/04/15/how-to-sync-git-clients-across-workstations-using-dropbox/</link>
		<comments>http://kudithipudi.org/2012/04/15/how-to-sync-git-clients-across-workstations-using-dropbox/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 02:47:38 +0000</pubDate>
		<dc:creator>Vinay</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://kudithipudi.org/?p=1368</guid>
		<description><![CDATA[I have recently started using git as a source control for the various scrips that I write. As I also mentioned in this post, I use dropbox to synchronize my data across workstations. Here is my setup for synchronizing git clients across multiple workstations using the same SSH keys (note: this is not a recommended setup from a security [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently started using git as a source control for the various scrips that I write. As I also mentioned in this <a href="http://kudithipudi.org/2011/11/13/how-to-move-your-life-into-the-cloud/">post</a>, I use dropbox to synchronize my data across workstations. Here is my setup for synchronizing git clients across multiple workstations using the same SSH keys (<strong>note</strong>: this is not a recommended setup from a security prospective. you are recommended to generate different SSH key pairs per workstation to ensure one key getting lost doesn&#8217;t compromise your entire account).</p>
<ol>
<li>Workstation 1</li>
<ol>
<li>create a directory under your dropbox root, that you want to use as your git home directory. Say DROPBOX/git</li>
<li>Install Git for Windows, or whatever git client you want to use</li>
<li>Change the home path on the git client by executing
<pre class="brush: plain; title: ; notranslate">HOME='PATH_TO_DROPBOX/DROPBOX/git' </pre>
</li>
<li>Check if the home path has been changed by executing
<pre class="brush: plain; title: ; notranslate">echo $HOME</pre>
</li>
<li>Create your SSH keys and configure your public key on the git server</li>
</ol>
<li>Workstation 2</li>
<ol>
<li>Repeat and rinse step 1 &#8211; 4 specified for workstation 1. You don&#8217;t need to create the SSH keys since the other clients will recognize the keys that dropbox would have synced up.</li>
</ol>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://kudithipudi.org/2012/04/15/how-to-sync-git-clients-across-workstations-using-dropbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

