No more excuse not to use large pages in Linux

This is a very quick post to remind users of the importance of large pages. Before 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

 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 thoughts on “No more excuse not to use large pages in Linux

    1. Martin Bach Post author

      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!

  1. Andy Klock

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

  2. Timur Akhmadeev

    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.

    1. Martin Bach Post author

      Thanks for the feedback! And also for pointing out the typo which is now fixed.

  3. goran

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


  4. Pingback: More on use_large_pages in Linux and « Martins Blog

Comments are closed.