Bug 2213984

Summary: RHEL documentation implies that using hugetlb-reserve-pages.sh is the most reliable way to reserve huge pages at boot in spite of possibility to do so through kernel cmdline instead
Product: Red Hat Enterprise Linux 8 Reporter: Jacob Ansari <jansari>
Component: DocumentationAssignee: Jacob Taylor Valdez <jvaldez>
Documentation sub component: default QA Contact: RHEL DPM <rhel-docs>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: low    
Priority: medium CC: aquini, rhel-docs
Version: ---Keywords: Documentation
Target Milestone: rcFlags: jvaldez: needinfo? (jansari)
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-28 06:52:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jacob Ansari 2023-06-10 16:05:39 UTC
Document URL: 

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/monitoring_and_managing_system_status_and_performance/index#parameters-for-reserving-hugetlb-pages-at-boot-time_configuring-huge-pages

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/monitoring_and_managing_system_status_and_performance/index#configuring-hugetlb-at-boot-time_configuring-huge-pages

Section Number and Name: 
36.2. Parameters for reserving HugeTLB pages at boot time
36.3. Configuring HugeTLB at boot time

Describe the issue: 

The note in Section 36.3 says "The most reliable way to reserve 1 GB pages is by using this hugetlb-reserve-pages.sh script, which runs early during boot."

However, section 36.2 just above describes how to reserve huge pages through the kernel cmdline, which should be even even more reliable as it is applied even earlier in the boot process than any systemd controlled script is . 

Additionally, the upstream kernel docs https://docs.kernel.org/admin-guide/mm/hugetlbpage.html mentions "The administrator can allocate persistent huge pages on the kernel boot command line by specifying the "hugepages=N" parameter, where 'N' = the number of huge pages requested. This is the most reliable method of allocating huge pages as memory has not yet become fragmented." which seems to contradict the note about hugetlb-reserve-pages.sh in section 36.3


Suggestions for improvement: 
Either clarify/explain why hugetlb-reserve-pages.sh should be regarded as the most reliable method or align RH docs with upstream kernel docs

Additional information: 
RHEL9 docs contain the same guidance about using hugetlb-reserve-pages.sh
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/monitoring_and_managing_system_status_and_performance/index#configuring-hugetlb-at-boot-time_configuring-huge-pages


RHEL7 docs contain the same guidance about using hugetlb-reserve-pages.sh
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/performance_tuning_guide/index#sect-Red_Hat_Enterprise_Linux-Performance_Tuning_Guide-Memory-Configuring-huge-pages

Comment 1 Jacob Taylor Valdez 2023-06-14 10:49:29 UTC
Hi, thanks for the report. I'll get to work on it!