Large RAM (Very Large memory) and large page (hugepages) series two--Configure large pages

Source: Internet
Author: User

How to configure Hugepages on the Linux platform


Noun Explanation:

Memlock-max Locked-in-memory address space (KB)



1. Configuration/etc/security/limits.conf memlock 参数

Memlock slightly less than the physical memory is greater than SGA, assuming that the physical memory is 64G can be configured so

VI/etc/security/limits.conf

*   Soft   memlock    60397977*   hard   memlock    60397977

2. Verify Oracle Software User environment variable Memlock settings

$ ulimit-l60397977

3. View Hugepages Related information

$ grep hugepagesize/proc/meminfo
[[email protected] trace]$ grep hugepagesize/proc/meminfo
hugepagesize:2048 KB


4. Using an Oracle script to calculate HUGEPAGES/HUGETLB setting values

#!/bin/bash

# # hugepages_settings.sh## Linux bash script to compute values for the# recommended hugepages/hugetlb configuration## Note : This script does calculation for all GKFX memory# segments available when the script is run, no matter it# are an oracl E RDBMS Shared memory segment or not.# Check for the kernel versionkern= ' uname-r | Awk-f. ' {printf ("%d.%d\n", $1,$2);} ' ' # Find out ' the Hugepage sizehpg_sz= ' grep hugepagesize/proc/meminfo | awk {' Print $ '} ' # Start from 1 pages to being on the safe side and guarantee 1 free hugepagenum_pg=1# cumulative number of P Ages required to handle the running GKFX memory segmentsfor seg_bytes in ' ipcs-m | awk {' Print $ '} | grep "[0-9][0-9]*" ' Do min_pg= ' echo ' $SEG _bytes/($HPG _sz*1024) "| Bc-q ' If [$MIN _pg-gt 0]; Then num_pg= ' echo ' $NUM _pg+ $MIN _pg+1 "| Bc-q ' fidone# Finish with resultscase $KERN in ' 2.4 ') hugetlb_pool= ' echo ' $NUM _pg* $HPG _sz/1024 "|          Bc-q ';   echo "Recommended Setting:vm.hugetlb_pool = $HUGETLB _pool";; ' 2.6 ') ECho "Recommended setting:vm.nr_hugepages = $NUM _pg";; *) echo "Unrecognized kernel version $KERN. Exiting. ";; Esac# End


5. write config file vi /etc/sysctl.conf

vm.nr_hugepages=Value_displayed_in_step_4

6. Restart the server

Verify the configuration:

grep huge/proc/meminfo


Limitations of Hugepages Use:

。 Oracle Automatic Memory Management (AMM) Memory_target and hugepages cannot coexist;

  • If you is using VLM in a 32-bit environment and then you cannot use Hugepages for the Database Buffer cache. You can use hugepages for other parts of the SGA, such asshared_pool,large_pool, and so on. Memory Allocation for VLM (buffer cache) was done using shared memory file systems (ramfs/tmpfs/shmfs). Memory file systems do not reserve or use hugepages.

  • Hugepages is not subject to allocation or release after system startup, unless a system administrator changes the HUGEPAG ES configuration, either by modifying the number of pages available, or by modifying the pool size. If the space required is not reserved in memory during system startup, then hugepages allocation fails


Large RAM (Very Large memory) and large page (hugepages) series two--Configure large pages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.