<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Performance tuning: HugePages in Linux</title>
	<atom:link href="http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Sat, 20 Mar 2010 20:27:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Noel Lucas</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-385851</link>
		<dc:creator>Noel Lucas</dc:creator>
		<pubDate>Thu, 19 Nov 2009 13:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-385851</guid>
		<description>Great article. It explains use of HugePages in a way that is easy to understand. This is the best article that I&#039;ve found on it.</description>
		<content:encoded><![CDATA[<p>Great article. It explains use of HugePages in a way that is easy to understand. This is the best article that I&#8217;ve found on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claus Gehner</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-351272</link>
		<dc:creator>Claus Gehner</dc:creator>
		<pubDate>Fri, 20 Mar 2009 17:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-351272</guid>
		<description>Excellent article - thanks.
We are implementing a number of recommendations from Oracle&#039;s RAC Assessment, and HugePage support was one of the high impact recommendations.
..
Also - I love your redesigned WEB site.. I found the previous one confusing and &quot;busy&quot;</description>
		<content:encoded><![CDATA[<p>Excellent article &#8211; thanks.<br />
We are implementing a number of recommendations from Oracle&#8217;s RAC Assessment, and HugePage support was one of the high impact recommendations.<br />
..<br />
Also &#8211; I love your redesigned WEB site.. I found the previous one confusing and &#8220;busy&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sravan</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-349270</link>
		<dc:creator>Sravan</dc:creator>
		<pubDate>Sat, 07 Mar 2009 13:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-349270</guid>
		<description>Suraj, here is a quick way to calculate the Hugepages. 

Hugepages is not a derived value, but an optional setting if you want to use Hugepages. So, if # of Hugepages is set to 2048, then you would have allocated 4G(2048*2M - assumption Hugepagesize=2M) of Hugepages space.


You can now create the SGA, which is allocated from the Hugepage space.</description>
		<content:encoded><![CDATA[<p>Suraj, here is a quick way to calculate the Hugepages. </p>
<p>Hugepages is not a derived value, but an optional setting if you want to use Hugepages. So, if # of Hugepages is set to 2048, then you would have allocated 4G(2048*2M &#8211; assumption Hugepagesize=2M) of Hugepages space.</p>
<p>You can now create the SGA, which is allocated from the Hugepage space.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suraj Sharma</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-348211</link>
		<dc:creator>Suraj Sharma</dc:creator>
		<pubDate>Wed, 04 Mar 2009 16:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-348211</guid>
		<description>Hi,

Thanks a lot for such meaningful and rare information about HugePages. I have a question thought (I may be confued or did not read your blog properly)

My question is:

How do we calculate the HugePages will it be like:

Let&#039;s assume my SGA is 4GB and my Hugepagesize is 2048KB then my HugePages would be 4*1024*1024 (to convert it into KB) and then divide it with 2048??

(4*1024*1024)/2048=2048 (round off to 3000)???

Please correct me if I am wrong.. Also let me know how the same will work in 32Bit Linux</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks a lot for such meaningful and rare information about HugePages. I have a question thought (I may be confued or did not read your blog properly)</p>
<p>My question is:</p>
<p>How do we calculate the HugePages will it be like:</p>
<p>Let&#8217;s assume my SGA is 4GB and my Hugepagesize is 2048KB then my HugePages would be 4*1024*1024 (to convert it into KB) and then divide it with 2048??</p>
<p>(4*1024*1024)/2048=2048 (round off to 3000)???</p>
<p>Please correct me if I am wrong.. Also let me know how the same will work in 32Bit Linux</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Closson's Oracle Blog: Platform, Storage &#38; Clustering Topics Related to Oracle Databases</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-341758</link>
		<dc:creator>Kevin Closson's Oracle Blog: Platform, Storage &#38; Clustering Topics Related to Oracle Databases</dc:creator>
		<pubDate>Tue, 17 Feb 2009 17:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-341758</guid>
		<description>&lt;strong&gt;Oracle11g Automatic Memory Management - Part I.  Linux Hugepages&#160;Support....&lt;/strong&gt;

I spent the majority of my time in the Oracle Database 11g Beta program testing storage-related aspects of the new release. To be honest, I didn&#8217;t even take a short peek at the new Automatic Memory Management feature. As I pointed out the other d...</description>
		<content:encoded><![CDATA[<p><strong>Oracle11g Automatic Memory Management &#8211; Part I.  Linux Hugepages&nbsp;Support&#8230;.</strong></p>
<p>I spent the majority of my time in the Oracle Database 11g Beta program testing storage-related aspects of the new release. To be honest, I didn&#8217;t even take a short peek at the new Automatic Memory Management feature. As I pointed out the other d&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Closson</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-341751</link>
		<dc:creator>Kevin Closson</dc:creator>
		<pubDate>Tue, 17 Feb 2009 17:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-341751</guid>
		<description>Riyaj,

  &quot;It gets a few hundred connections at a time&quot; is key to this whole thread and deserves more attention. The multiplier affect of non-shared page tables is what was eating up so much memory. For every foreground process the system required 10MB of page tables. There seems to have been about 500 dedicated connections at the time meminfo was examined.

  As for &quot;Most likely, much of SGA pages also can be paged out, since SGA is not locked in memory&quot;, it is true that SGA pages can be swapped out...*only if* they have only been touched by one process. Mutliply referenced shared pages do not get swapped. Allowing this sort of swapping would cause a horrible chain reaction. After all, there are more than one processes using SGA pages. That aside, the page tables mapping the SGA are swapable. It is easy to account for the 4.7GB leaps in available memory you measured with sar by the simple swapping of the data,stack and page tables of just a percentage of the huge number of processes running on the system.

Mladen is right about the cost of losing AMM from a managability perspective.

I blogged about 11g AMM quite a while ago as well:

http://kevinclosson.wordpress.com/2007/08/23/oracle11g-automatic-memory-management-and-linux-hugepages-support/</description>
		<content:encoded><![CDATA[<p>Riyaj,</p>
<p>  &#8220;It gets a few hundred connections at a time&#8221; is key to this whole thread and deserves more attention. The multiplier affect of non-shared page tables is what was eating up so much memory. For every foreground process the system required 10MB of page tables. There seems to have been about 500 dedicated connections at the time meminfo was examined.</p>
<p>  As for &#8220;Most likely, much of SGA pages also can be paged out, since SGA is not locked in memory&#8221;, it is true that SGA pages can be swapped out&#8230;*only if* they have only been touched by one process. Mutliply referenced shared pages do not get swapped. Allowing this sort of swapping would cause a horrible chain reaction. After all, there are more than one processes using SGA pages. That aside, the page tables mapping the SGA are swapable. It is easy to account for the 4.7GB leaps in available memory you measured with sar by the simple swapping of the data,stack and page tables of just a percentage of the huge number of processes running on the system.</p>
<p>Mladen is right about the cost of losing AMM from a managability perspective.</p>
<p>I blogged about 11g AMM quite a while ago as well:</p>
<p><a href="http://kevinclosson.wordpress.com/2007/08/23/oracle11g-automatic-memory-management-and-linux-hugepages-support/" rel="nofollow">http://kevinclosson.wordpress.com/2007/08/23/oracle11g-automatic-memory-management-and-linux-hugepages-support/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugepages revisited II: Be aware of kernel bugs! &#124; ora-solutions.net - Martin Decker</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-325890</link>
		<dc:creator>Hugepages revisited II: Be aware of kernel bugs! &#124; ora-solutions.net - Martin Decker</dc:creator>
		<pubDate>Wed, 07 Jan 2009 11:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-325890</guid>
		<description>[...] can reduce the overhead of managing memory pages of Oracle SGA by the operating system thus leading to lower system cpu utilization. I have written two blog entries regarding this topic already: Listener Coredumps on heavy load [...]</description>
		<content:encoded><![CDATA[<p>[...] can reduce the overhead of managing memory pages of Oracle SGA by the operating system thus leading to lower system cpu utilization. I have written two blog entries regarding this topic already: Listener Coredumps on heavy load [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riyaj Shamsudeen</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-300879</link>
		<dc:creator>Riyaj Shamsudeen</dc:creator>
		<pubDate>Mon, 17 Nov 2008 17:21:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-300879</guid>
		<description>
Hi Mladen

 Thanks for your kind words.

 1. I just tested it out in my linux server running 2.6 kernel. ASMM uses hugepages, as long as, available hugepages is greater than sga_max_size. ML note you referred is for 32 bit+use_indirect_buffers and Of course, use_indirect_buffers will not work with hugepages. But, ASMM itself works fine with hugepages. 

  11g AMM will not work with hugepages though. 

 2. You are right, I should have said &quot;5GB pagetable&quot; need to be scanned. Nevertheless, scanning 5GB of page table will consume enormous amount of CPU. 

 Thanks for those paging parameters. I see your point that if all these parameters are optimally setup, we might be able to reduce this effect. 
 I would rather prefer to keep page table itself much smaller, two reasons: 1)Bigger page table results in higher CPU usage from user processes due to higher TLB misses 2) Unnecessary waste for page table memory. For e.g., in this specific scenario, after setting up hugepages, pagetable size went down from 5GB to 400MB, a net gain of 4.4GB. We could allocate this memory to SGA allowing further gain.

Hi Cristian
 Thanks for reading our blog. We might need more data to understand your specific situation.

Cheers
Riyaj
</description>
		<content:encoded><![CDATA[<p>Hi Mladen</p>
<p> Thanks for your kind words.</p>
<p> 1. I just tested it out in my linux server running 2.6 kernel. ASMM uses hugepages, as long as, available hugepages is greater than sga_max_size. ML note you referred is for 32 bit+use_indirect_buffers and Of course, use_indirect_buffers will not work with hugepages. But, ASMM itself works fine with hugepages. </p>
<p>  11g AMM will not work with hugepages though. </p>
<p> 2. You are right, I should have said &#8220;5GB pagetable&#8221; need to be scanned. Nevertheless, scanning 5GB of page table will consume enormous amount of CPU. </p>
<p> Thanks for those paging parameters. I see your point that if all these parameters are optimally setup, we might be able to reduce this effect.<br />
 I would rather prefer to keep page table itself much smaller, two reasons: 1)Bigger page table results in higher CPU usage from user processes due to higher TLB misses 2) Unnecessary waste for page table memory. For e.g., in this specific scenario, after setting up hugepages, pagetable size went down from 5GB to 400MB, a net gain of 4.4GB. We could allocate this memory to SGA allowing further gain.</p>
<p>Hi Cristian<br />
 Thanks for reading our blog. We might need more data to understand your specific situation.</p>
<p>Cheers<br />
Riyaj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #123: a Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-299696</link>
		<dc:creator>Log Buffer #123: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 14 Nov 2008 17:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-299696</guid>
		<description>[...] on the Pythian Group Blog, Riyaj Shamsudeen contributed an item on performance tuning with HugePages in Linux, showing again the real advantages of knowing your way around the host [...]</description>
		<content:encoded><![CDATA[<p>[...] on the Pythian Group Blog, Riyaj Shamsudeen contributed an item on performance tuning with HugePages in Linux, showing again the real advantages of knowing your way around the host [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mladen Gogala</title>
		<link>http://www.pythian.com/news/1326/performance-tuning-hugepages-in-linux/#comment-299609</link>
		<dc:creator>Mladen Gogala</dc:creator>
		<pubDate>Fri, 14 Nov 2008 13:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/1326/performance-tuning-hugepages-in-linux#comment-299609</guid>
		<description>Riyaj, your blog is great and I read it on the regular basis. Let me answer your questions:
1) ASMM and HugePages are mutually exclusive, at least in Oracle10g. Look at the ML note 317141.1 which explicitly asks you to remove SGA_TARGET. And yes, I am a bit old, my nomenclature is from 9i. I do prefer descriptive names like &quot;dynamic SGA management&quot; to the alphabet soup like &quot;ASMM&quot;. 
2) There is no scanning of 10GB or memory. System is scanning page tables, not pages themselves. Page tables are 4096 times smaller. The scanning, however, is not a problem. If you leave enough free memory, searching for free memory will not be a problem. In particular, setting vm.min_free_kbytes to 1048576 would make sure that the system will always maintain 1GB of free memory. Also, setting vm.overcommit to 1 would eliminate the need for checking swap every time the memory is allocated. The page cluster should be set to 5, to enable fast writing where possible. Also, you should turn off that pesky swappiness as it would devour resources needlessly.
Kindest regards,
Mladen Gogala</description>
		<content:encoded><![CDATA[<p>Riyaj, your blog is great and I read it on the regular basis. Let me answer your questions:<br />
1) ASMM and HugePages are mutually exclusive, at least in Oracle10g. Look at the ML note 317141.1 which explicitly asks you to remove SGA_TARGET. And yes, I am a bit old, my nomenclature is from 9i. I do prefer descriptive names like &#8220;dynamic SGA management&#8221; to the alphabet soup like &#8220;ASMM&#8221;.<br />
2) There is no scanning of 10GB or memory. System is scanning page tables, not pages themselves. Page tables are 4096 times smaller. The scanning, however, is not a problem. If you leave enough free memory, searching for free memory will not be a problem. In particular, setting vm.min_free_kbytes to 1048576 would make sure that the system will always maintain 1GB of free memory. Also, setting vm.overcommit to 1 would eliminate the need for checking swap every time the memory is allocated. The page cluster should be set to 5, to enable fast writing where possible. Also, you should turn off that pesky swappiness as it would devour resources needlessly.<br />
Kindest regards,<br />
Mladen Gogala</p>
]]></content:encoded>
	</item>
</channel>
</rss>
