https://access.redhat.com/solutions/46111环境Red Hat Enterprise linux (RHEL) 6Red Hat Enterprise Linux (RHEL) 7问题How do tr
Note:
Transparent Huge Pages are not available on the 32-bit version of RHEL 6.
For RHEL 7 see How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
For RHEL 8 see How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 8
Transparent Huge Pages (THP) are enabled by default in RHEL 6 for all applications. The kernel attempts to allocate hugepages whenever possible and any Linux process will receive 2MB pages if the mmap region is 2MB naturally aligned. The main kernel address space itself is mapped with hugepages, reducing TLB pressure from kernel code. For general information on Hugepages, see: What are Huge Pages and what are the advantages of using them?
The kernel will always attempt to satisfy a memory allocation using hugepages. If no hugepages are available (due to non availability of physically continuous memory for example) the kernel will fall back to the regular 4KB pages. THP are also swappable (unlike hugetlbfs). This is achieved by breaking the huge page to smaller 4KB pages, which are then swapped out normally.
But to use hugepages effectively, the kernel must find physically continuous areas of memory big enough to satisfy the request, and also properly aligned. For this, a khugepaged kernel thread has been added. This thread will occasionally attempt to substitute smaller pages being used currently with a hugepage allocation, thus maximizing THP usage.
In userland, no modifications to the applications are necessary (hence transparent). But there are ways to optimize its use. For applications that want to use hugepages, use of posix_memalign() can also help ensure that large allocations are aligned to huge page (2MB) boundaries.
Also, THP is only enabled for anonymous memory regions. There are plans to add support for tmpfs and page cache. THP tunables are found in the /sys
tree under /sys/kernel/mm/redhat_transparent_hugepage
.
The values for /sys/kernel/mm/redhat_transparent_hugepage/enabled
can be one of the following:
--结束END--
本文标题: Red Hat Enterprise Linux 6 7关闭透明大页面及透明大页面基础概念
本文链接: https://lsjlt.com/news/243639.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0