RE: Some more hugepages questions/thoughts

From: <Christopher.Taylor2_at_parallon.net>
Date: Thu, 2 May 2013 08:11:04 -0500
Message-ID: <F05D8DF1FB25F44085DB74CB916678E8879DEB2702_at_NADCWPMSGCMS10.hca.corpad.net>



Thanks Nuno - I'll keep that in mind.

I wish Linux had more than 2MB pagesizes the way AIX does but it doesn't seem to unless I'm missing something. I don't get to work on AIX often as I'm not the primary on any of those systems. AIX is definitely an interesting animal.

Thanks again for your help and it's much appreciated.

Chris

-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Nuno Souto Sent: Thursday, May 02, 2013 6:05 AM
To: oracle-l_at_freelists.org
Subject: Re: Some more hugepages questions/thoughts

Just a word of caution, Chris. Read it more as a heads up than as "pending doom"!

Hugepages necessitate that the software using them aligns memory allocations on a page boundary, under penalty of grossly wasting memory. In C/C++, there is a specific syntax to do that when using malloc() and other such. Look up shmalloc and you will see some examples.

Now, Oracle doesn't do this alignment ad-hoc. It assumes that if you want to use hugepages - in Linux - then it'll align to pre-defined values. These vary from OS to OS. In Linux it's fairly relaxed. But in Aix it's better to use 16MB pagesize until Aix 7.1 and Oracle 11r2.

Quite a lot of good info and good links in Tim Hall's site: http://www.oracle-base.com/articles/linux/configuring-huge-pages-for-oracle-on-linux-64.php

And try to not mix sizes of hugepages in the same system. Stick to one value. Not always possible - eg, Aix uses 64K pages for portions of the OS in release 7 onwards - but it doesn't hurt to not go overboard.

I'm a bit spoiled by Aix as there it is possible to use largepages only for SGA, leaving the Oracle processes untouched. Or to allocate it also to processes. Or any mix in between. And the total amount can be dynamically varied without a reboot. But in other OS types things are not that easy and it pays to think about how to allocate the memory. Which you are doing and all credit for it!

--

Cheers
Nuno Souto
dbvision_at_iinet.net.au

--

http://www.freelists.org/webpage/oracle-l Received on Thu May 02 2013 - 15:11:04 CEST

Original text of this message