Red Hat Enterprise Linux 6 7关闭透明大页面及透明大页面基础概念
https://access.redhat.com/solutions/46111
环境
- Red Hat Enterprise Linux (RHEL) 6
- Red Hat Enterprise Linux (RHEL) 7
问题
- How do transparent hugepages work in RHEL 6?
- How are transparent hugepages activated by a process?
- Do we still need to preallocate some amount of memory for use as (transparent) hugepages?
- How can I see the number of transparent hugepages that are actually in use on the system (either globally or by individual processes)?
- How do I enable HugePages on Red Hat Enterprise Linux?
- How do I disable HugePages on Red Hat Enterprise Linux?
- Freezing issue while streaming out from RHEL 6.2 server, We are providing a streaming platform (RTSP, HLS) to our customers, based on RHEL 6.2 x86_64
While streaming out, we experiencing delays (more than one to ten seconds) because of a process freeze and at the same point in time a bunch of memory is being freed - Need assistance to Disable Transparent Huge Pages (THP) in RHEL 7.4
决议
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:
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
Red Hat Enterprise Linux 6 7关闭透明大页面及透明大页面基础概念
下载Word文档到电脑,方便收藏和打印~
猜你喜欢
Red Hat Enterprise Linux 6 7关闭透明大页面及透明大页面基础概念
编程热搜
如何保证Linux服务器的安全
很少见有人马上为一台新安装的服务器做安全措施,然而我们生活所在的这个社会使得这件事情是必要的。不过为什么仍旧这么多人把它拖在最后?我已经做了相同的事情,它常常可以归结为想要马上进入有趣的东西。希望这篇文章将向大家展示,确保服务器安全没有你想Linux中搭建完整的samba服务器全攻略(centos版)
前言 smb是一个协议名,它能被用于Web连接和客户端与服务器之间的信息沟通。SMB最初是IBM的贝瑞费根鲍姆(Barry Feigenbaum)研制的,其目的是将DOS操作系统中的本地文件接口“中断13”改造为网络文件系统。 smb服务简Linux、ubuntu系统下查看显卡型号、显卡信息详解
本文将介绍linux系统下查看显卡硬件信息内容如下: 如何在ubuntu系统中查看显卡型号。(其他文章大多只介绍了命令而未介绍如何对应显卡型号) 在ubuntu系统中显卡详细信息,以及所代表的含义。 一,查看显卡型号 1,查看显卡型号命令
编程资源站
- 资料下载
- 历年试题