Martins Blog

Trying to explain complex things in simple terms

No more excuse not to use large pages in Linux

Posted by Martin Bach on March 17, 2012

This is a very quick post to remind users of the importance of large pages. Before 11.2.0.2 it was a little more elaborate process to determine the number of large pages to be set aside for Oracle, but now it’s so simple there isn’t any more excuse not to use large pages. If you have > 16G SGA and lots of processes, check the impact of large pages in /proc/meminfo before and after. By implementing large pages at a former company I reduced the page tables overhead from 20G (60G sga, processes set to 1000, most often around 800 sessions connected) to a fraction of that number.

Here is why you can’t hide anymore:

Starting ORACLE instance (normal)
****************** Large Pages Information *****************

Total Shared Global Region in Large Pages = 0 KB (0%)

Large Pages used by this instance: 0 (0 KB)
Large Pages unused system wide = 0 (0 KB) (alloc incr 64 MB)
Large Pages configured system wide = 0 (0 KB)
Large Page size = 2048 KB

RECOMMENDATION:
 Total Shared Global Region size is 20 GB. For optimal performance,
 prior to the next instance restart increase the number
 of unused Large Pages by atleast 10241 2048 KB Large Pages (20 GB)
 system wide to get 100% of the Shared
 Global Region allocated with Large pages
***********************************************************

Now just set vm.nr_hugepages (plus memlock in /etc/security/limits.conf) and off you go!

8 Responses to “No more excuse not to use large pages in Linux”

  1. Ma I be so bold as to leave a link to related info on my blog, Martin? Here: http://kevinclosson.wordpress.com/2010/09/28/configuring-linux-hugepages-for-oracle-database-is-just-too-difficult-part-i/

    • Martin Bach said

      Always! And for the record: you were first :) Still don’t understand why people still question the use of large pages – this has been around for so long now!

  2. Andy Klock said

    And with the parameter use_large_pages set to “only” you no longer need to wonder or be reminded.

  3. Another good news is Oracle is now able to allocate SGA in huge pages partially. So if you don’t have enough HP, you still get parts of SGA sitting in the right place.

  4. Quick and to the point – I like. To make things even clearer, you should consider fixing the “No just set vm.nr_hugepage” typo.

  5. goran said

    Thanks for pointing this out … this plus what Timur described … Oracle did a good job on this area.

    cheers,
    goran

  6. […] No more excuses not to use large pages in Linux […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: