Get the App
SLTechnology News&Howtos  ›  Database  › 

How to configure large pages in oracle

Shulou Source: shulou.com Published: 2022-05-31 14:05:55 10月03日 Update

Editor to share with you how to configure the big page of oracle, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Advantages of Oracle configuration large pages:

1. HugePages allocates and retains memory areas of corresponding size directly when the system starts up.

2. HugePages will not be released and changed without the intervention of the administrator after boot.

3. Not swappable: HugePages does not know swap, that is, there is no page-in/page-out. HugePages has been pin in memory

To set up a large page:

1. View the current large page usage of the system:

[oracle@ora3 ~] $cat / proc/meminfo | grep Huge

HugePages_Total: 0

HugePages_Free: 0

HugePages_Rsvd: 0

HugePages_Surp: 0

Hugepagesize: 2048 kB-- the size of each large page is 2m

SQL > show parameter sga_max-- View database SGA size-- my experimental machine

NAME TYPE VALUE

-

Sga_max_size big integer 940M

two。 Set the number of large pages

Here is a maximum of 940m * 2m memory 1000M Magna SGA. The memory of large pages must be larger than the size of SGA before it can be used by ORACLE, so set 500m.

Vi / etc/sysctl.conf

Add a line to it:

Vm.nr_hugepages=500-the number of large pages

Execution of sysctl-p / etc/sysctl.conf takes effect after saving

Check:-- if HugePages_Free: less than 200, execute sysctl-p a few more times (I have executed dozens of times)

3, you also need to set memory locks:-- the number of memlock should be greater than the number of large pages-- set to unlimited, with no limit.

Vi / etc/security/limits.conf

Oracle soft memlock unlimited

Oracle hard memlock unlimited

4. Restart the database to view the usage of large pages

The above is all the contents of the article "how to configure the big page of oracle". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Memory size configuration quantity articles content situation data database system maximum row not much number that is advantages areas most more steps Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Microsoft Redmi macOS