<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Pythian Goodies: The Answer to Free Memory, Swap, Oracle, and Everything</title>
	<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything</link>
	<description>News and views from Pythian DBAs</description>
	<pubDate>Tue, 14 Oct 2008 03:56:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Steve Kirby</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-239196</link>
		<dc:creator>Steve Kirby</dc:creator>
		<pubDate>Sat, 19 Jul 2008 00:14:37 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-239196</guid>
		<description>This is an awesome presentation.  Great discussion that covered issues I was currently having with a client.  Thanks.</description>
		<content:encoded><![CDATA[<p>This is an awesome presentation.  Great discussion that covered issues I was currently having with a client.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan McLellan</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-194556</link>
		<dc:creator>Bryan McLellan</dc:creator>
		<pubDate>Thu, 08 May 2008 23:14:19 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-194556</guid>
		<description>Thanks for the writeup on meminfo, it's scarcely documented. Would you be able to explain how to tell from these values how much memory is being used by user applications? I can't get tools like 'memstat' to agree with the way munin calculates used memory from meminfo, which is making it difficult to troubleshoot what appears to be a leak based on munin's data.</description>
		<content:encoded><![CDATA[<p>Thanks for the writeup on meminfo, it&#8217;s scarcely documented. Would you be able to explain how to tell from these values how much memory is being used by user applications? I can&#8217;t get tools like &#8216;memstat&#8217; to agree with the way munin calculates used memory from meminfo, which is making it difficult to troubleshoot what appears to be a leak based on munin&#8217;s data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How To Build Scalable Database Architectures</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-170349</link>
		<dc:creator>How To Build Scalable Database Architectures</dc:creator>
		<pubDate>Wed, 12 Mar 2008 21:27:30 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-170349</guid>
		<description>[...] If you&#8217;re running Linux, set HugePages and free up your RAM to be usable real work, instead of wasting it on addressing. Christo Kutrovsky made an excellent presentation on this topic. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] If you&#8217;re running Linux, set HugePages and free up your RAM to be usable real work, instead of wasting it on addressing. Christo Kutrovsky made an excellent presentation on this topic. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-146530</link>
		<dc:creator>Christo Kutrovsky</dc:creator>
		<pubDate>Fri, 04 Jan 2008 14:58:31 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-146530</guid>
		<description>Hi Kevin,

Yes I know the times I picked are now not matching reality any more. However I think I do mention in the presentation (maybe i've forgoten this time) that the exact times are not as important as the ratio of difference between the different memory types.</description>
		<content:encoded><![CDATA[<p>Hi Kevin,</p>
<p>Yes I know the times I picked are now not matching reality any more. However I think I do mention in the presentation (maybe i&#8217;ve forgoten this time) that the exact times are not as important as the ratio of difference between the different memory types.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahid</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-146392</link>
		<dc:creator>Shahid</dc:creator>
		<pubDate>Thu, 03 Jan 2008 22:27:15 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-146392</guid>
		<description>Hi,
I hope you can clear some of my doubts about memory concepts related to aix OS.

Stats:
AIX 5.3, P590 series. 8 CPUs, 27GB RAM allocated for the machine partition.
 DB SGA 4GB
MAXCLIENT=MAXPERM% = 20% (MIN IS 10%)
lru_file_repage =1
strict value for maxperm and for maxclient both set to 1.
File system=jfs2.
paging = 1% all the time (means no paging)

Consider the following at point in time:
From vmstat -v, it is clear the file cache is at 19.8% meaning almost all of 20% of 27gb = 5.4gb is in used by file cache for jfs2. 

From svmon and vmstat , free memory is 6gb.
From nmon also it says total mem=27gb, free=6gb and used=21gb and file cache used is 5.4 gb.

I would like to know where i am doing wrong below:
Objective:
Try to add the os processes memory usage + shared segments +freemem, 
 and sum should map to 27gb (which is the total memory).

Tot_memory = File_cache + unixprocesses + shared segment memory +freemem
27gb = 5.4 gb + 9gb + 4gb +6g (as you see i am missing 2.4gb uncounted for)

Running the above at different times more or less am short of 2-2.4 gb always. Where is this 2.4 gb and who is using it? If you say to me that this 2.4 gb is actually persistent memory from disk files and the freemem shown my vmstat is actually not complete true, then i need to find out how to calculate this persistent memory on my machine and that better sum to 2.4 gb so that i can reconcile the total mem.

Filecache, freemem and shared segment calculation is pretty much straight forward, and i think you all know how it is to be calculated. (I even checked ipcs -b and i do not have a memory segment orphan etc).

How I come up with 9gb is simple.(9gb is sum of all unix processes memory usage)
Running ps vg command and adding (rss-trs)/1024 (mb) to sum for those process ids where PID is also available in (select pid from v$process).
To this i add sum of rss for rest of the remaining process(oracle  listener, dbconsole, and root processes etc).

Oracle processes adds up to major like 8gb, rest 1gb is for all remaining processes.


What about jave heap, is this a separate memory that wont come in ps vg and also in ipcs -b?? Am at a loss.

My only obj for now is to find ways to add all process memory + shared segments + free + file cache and this should sum to 27gb or at least the difference should not be so high as 2.4 gb missing.
I checked i don't have a leaking unless u tell me how to check??

Cheers
shahid

CAN YOU PLEASE SEND THE REPLY TO MSHAHID@ALFRANSI.COM.SA OR ORACLEFUSIONS@GMAIL.COM</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I hope you can clear some of my doubts about memory concepts related to aix OS.</p>
<p>Stats:<br />
AIX 5.3, P590 series. 8 CPUs, 27GB RAM allocated for the machine partition.<br />
 DB SGA 4GB<br />
MAXCLIENT=MAXPERM% = 20% (MIN IS 10%)<br />
lru_file_repage =1<br />
strict value for maxperm and for maxclient both set to 1.<br />
File system=jfs2.<br />
paging = 1% all the time (means no paging)</p>
<p>Consider the following at point in time:<br />
From vmstat -v, it is clear the file cache is at 19.8% meaning almost all of 20% of 27gb = 5.4gb is in used by file cache for jfs2. </p>
<p>From svmon and vmstat , free memory is 6gb.<br />
From nmon also it says total mem=27gb, free=6gb and used=21gb and file cache used is 5.4 gb.</p>
<p>I would like to know where i am doing wrong below:<br />
Objective:<br />
Try to add the os processes memory usage + shared segments +freemem,<br />
 and sum should map to 27gb (which is the total memory).</p>
<p>Tot_memory = File_cache + unixprocesses + shared segment memory +freemem<br />
27gb = 5.4 gb + 9gb + 4gb +6g (as you see i am missing 2.4gb uncounted for)</p>
<p>Running the above at different times more or less am short of 2-2.4 gb always. Where is this 2.4 gb and who is using it? If you say to me that this 2.4 gb is actually persistent memory from disk files and the freemem shown my vmstat is actually not complete true, then i need to find out how to calculate this persistent memory on my machine and that better sum to 2.4 gb so that i can reconcile the total mem.</p>
<p>Filecache, freemem and shared segment calculation is pretty much straight forward, and i think you all know how it is to be calculated. (I even checked ipcs -b and i do not have a memory segment orphan etc).</p>
<p>How I come up with 9gb is simple.(9gb is sum of all unix processes memory usage)<br />
Running ps vg command and adding (rss-trs)/1024 (mb) to sum for those process ids where PID is also available in (select pid from v$process).<br />
To this i add sum of rss for rest of the remaining process(oracle  listener, dbconsole, and root processes etc).</p>
<p>Oracle processes adds up to major like 8gb, rest 1gb is for all remaining processes.</p>
<p>What about jave heap, is this a separate memory that wont come in ps vg and also in ipcs -b?? Am at a loss.</p>
<p>My only obj for now is to find ways to add all process memory + shared segments + free + file cache and this should sum to 27gb or at least the difference should not be so high as 2.4 gb missing.<br />
I checked i don&#8217;t have a leaking unless u tell me how to check??</p>
<p>Cheers<br />
shahid</p>
<p>CAN YOU PLEASE SEND THE REPLY TO <a href="mailto:MSHAHID@ALFRANSI.COM.SA">MSHAHID@ALFRANSI.COM.SA</a> OR <a href="mailto:ORACLEFUSIONS@GMAIL.COM">ORACLEFUSIONS@GMAIL.COM</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Closson</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-145450</link>
		<dc:creator>Kevin Closson</dc:creator>
		<pubDate>Mon, 31 Dec 2007 19:24:40 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-145450</guid>
		<description>Just a nit: I'd recommend another look at slide 11. 2ns for registers? That's on the order of 7 clock cycles for a 3GHz processor. L2 isn't even that slow.</description>
		<content:encoded><![CDATA[<p>Just a nit: I&#8217;d recommend another look at slide 11. 2ns for registers? That&#8217;s on the order of 7 clock cycles for a 3GHz processor. L2 isn&#8217;t even that slow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Lamarche</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-144197</link>
		<dc:creator>Julien Lamarche</dc:creator>
		<pubDate>Thu, 27 Dec 2007 02:30:22 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-144197</guid>
		<description>Video auto-plays.   Not sure that is best if viewing in, say, a library.</description>
		<content:encoded><![CDATA[<p>Video auto-plays.   Not sure that is best if viewing in, say, a library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason arneil</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142598</link>
		<dc:creator>jason arneil</dc:creator>
		<pubDate>Fri, 21 Dec 2007 10:47:00 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142598</guid>
		<description>don,

You can see that you have allocated 8193 hugepages to something, so on your system, unless something else is using 10g of ram, the chances are it's oracle.

Christo- as far as I can see it matters not to set the hugetlb_shm_group - oracle will be able to grab hugepages, certainly i see this behaviour on Redhat 4 Update 3 2.6.9-34.ELsmp  kernel. (64-bit). 

HugePages_Total:  3250
HugePages_Free:    114
Hugepagesize:     2048 kB

cat /proc/sys/vm/hugetlb_shm_group 
0

my /etc/security/limits.comf is also unedited, and I'm still allocating - only when using srvctl though.

Except my only allocate via srvctl also only works when setting both the group and the security limits. This is RAC though.</description>
		<content:encoded><![CDATA[<p>don,</p>
<p>You can see that you have allocated 8193 hugepages to something, so on your system, unless something else is using 10g of ram, the chances are it&#8217;s oracle.</p>
<p>Christo- as far as I can see it matters not to set the hugetlb_shm_group - oracle will be able to grab hugepages, certainly i see this behaviour on Redhat 4 Update 3 2.6.9-34.ELsmp  kernel. (64-bit). </p>
<p>HugePages_Total:  3250<br />
HugePages_Free:    114<br />
Hugepagesize:     2048 kB</p>
<p>cat /proc/sys/vm/hugetlb_shm_group<br />
0</p>
<p>my /etc/security/limits.comf is also unedited, and I&#8217;m still allocating - only when using srvctl though.</p>
<p>Except my only allocate via srvctl also only works when setting both the group and the security limits. This is RAC though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: From C to PL/SQL &#171; I&#8217;m just a simple DBA on a complex production system</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142509</link>
		<dc:creator>From C to PL/SQL &#171; I&#8217;m just a simple DBA on a complex production system</dc:creator>
		<pubDate>Fri, 21 Dec 2007 03:13:41 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142509</guid>
		<description>[...] in low level internals, and particularly memory management. Lucky for me, Christo Kutrovsky published a paper about this exact topic. It is the perfect paper - crystal clear, gets into all the interesting and important details, no [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] in low level internals, and particularly memory management. Lucky for me, Christo Kutrovsky published a paper about this exact topic. It is the perfect paper - crystal clear, gets into all the interesting and important details, no [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142448</link>
		<dc:creator>Christo Kutrovsky</dc:creator>
		<pubDate>Thu, 20 Dec 2007 22:20:24 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/741/pythian-goodies-free-memory-swap-oracle-and-everything#comment-142448</guid>
		<description>I have gotten reports on this as well. Seems like the "hugetlb_shm_group" is not really honored. I havent tested it, and I set it up every time.

Looks like it's used since you have less free pages then taken. Which means *something* has taken them.

You can do the math to be sure:

do a "ipcs" then look how big the shared memory segment is, and compare it to the memory taken (in your case, 10240 - 2047 = 8193*2 = 16386 mb). 

SUSE users: beware, suse does "lasy" allocation of hugepages. Which can be a problem if you start multiple databases that wont fit if they touch all it's SGA.</description>
		<content:encoded><![CDATA[<p>I have gotten reports on this as well. Seems like the &#8220;hugetlb_shm_group&#8221; is not really honored. I havent tested it, and I set it up every time.</p>
<p>Looks like it&#8217;s used since you have less free pages then taken. Which means *something* has taken them.</p>
<p>You can do the math to be sure:</p>
<p>do a &#8220;ipcs&#8221; then look how big the shared memory segment is, and compare it to the memory taken (in your case, 10240 - 2047 = 8193*2 = 16386 mb). </p>
<p>SUSE users: beware, suse does &#8220;lasy&#8221; allocation of hugepages. Which can be a problem if you start multiple databases that wont fit if they touch all it&#8217;s SGA.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
