成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術(shù)文章
文章詳情頁

Linux關(guān)于透明大頁機(jī)制的介紹

瀏覽:351日期:2023-03-07 14:40:03

透明大頁介紹

Transparent Huge Pages的一些官方介紹資料:

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.

查看是否啟用透明大頁

1:命令cat /sys/kernel/mm/redhat_transparent_hugepage/enabled 該命令適用于Red Hat Enterprise Linux系統(tǒng)

[root@getlnx06 ~]# more /etc/issue Red Hat Enterprise Linux Server release 6.6 (Santiago) Kernel \r on an \m [root@getlnx06 ~]# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled [always] madvise never

2:命令cat /sys/kernel/mm/transparent_hugepage/enabled 該命令適用于其它Linux系統(tǒng)

[root@getlnx06 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] [root@getlnx06 ~]# 

使用命令查看時(shí),如果輸出結(jié)果為[always]表示透明大頁啟用了。[never]表示透明大頁禁用、[madvise]表示(只在MADV_HUGEPAGE標(biāo)志的VMA中使用THP

3:如何HugePages_Total返回0,也意味著標(biāo)準(zhǔn)大頁禁用了(注意傳統(tǒng)/標(biāo)準(zhǔn)大頁和透明大頁的區(qū)別)

透明大頁(THP)管理和標(biāo)準(zhǔn)/傳統(tǒng)大頁(HP)管理都是操作系統(tǒng)為了減少頁表轉(zhuǎn)換消耗的資源而發(fā)布的新特性,雖然ORACLE建議利用大頁機(jī)制來提高數(shù)據(jù)庫的性能,但是ORACLE卻同時(shí)建議關(guān)閉透明大頁管理。這二者的區(qū)別在于大頁的分配機(jī)制,標(biāo)準(zhǔn)大頁管理是預(yù)分配的方式,而透明大頁管理則是動(dòng)態(tài)分配的方式。

[root@getlnx06 ~]# grep -i HugePages_Total /proc/meminfo  HugePages_Total: 0

4:cat /proc/sys/vm/nr_hugepages返回0也意味著傳統(tǒng)大頁禁用了(傳統(tǒng)大頁和透明大頁)。

[root@getlnx06 ~]# cat /proc/sys/vm/nr_hugepages  0

禁用、啟用透明大頁功能

方法1:設(shè)置/etc/grub.conf文件,在系統(tǒng)啟動(dòng)是禁用。

[root@getlnx06 ~]# vi /etc/grub.conf# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE:  You have a /boot partition.  This means that#  all kernel and initrd paths are relative to /boot/, eg.#  root (hd0,0)#  kernel /vmlinuz-version ro root=/dev/mapper/VolGroup--LogVol0-LogVol01#  initrd /initrd-[generic-]version.img#boot=/dev/sdadefault=0timeout=5

方法2:設(shè)置/etc/rc.local文件

[root@getlnx06 ~]# vi /etc/rc.local#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don"t# want to do the full Sys V style init stuff. touch /var/lock/subsys/local if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then   echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabledfi

使用上面的配置后必須重啟操作系統(tǒng)才能生效,你也可以運(yùn)行下面命令不用重啟操作系統(tǒng)。

You must reboot your system for the setting to take effect, or run the following two echo lines to proceed with the install without rebooting:

[root@getlnx06 ~]# echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled[root@getlnx06 ~]# cat /sys/kernel/mm/redhat_transparent_hugepage/enabledalways madvise [never][root@getlnx06 ~]# 

小知識(shí)點(diǎn):

1:從RedHat 6, OEL 6, SLES 11 and UEK2 kernels 開始,系統(tǒng)缺省會(huì)啟用 Transparent HugePages :用來提高內(nèi)存管理的性能透明大頁(Transparent HugePages )和之前版本中的大頁功能上類似。主要的區(qū)別是:Transparent HugePages 可以實(shí)時(shí)配置,不需要重啟才能生效配置;

2:Transparent Huge Pages在32位的RHEL 6中是不支持的。

Transparent Huge Pages are not available on the 32-bit version of RHEL 6.

3: ORACLE官方不建議我們使用RedHat 6, OEL 6, SLES 11 and UEK2 kernels 時(shí)的開啟透明大頁(Transparent HugePages ), 因?yàn)橥该鞔箜摚═ransparent HugePages ) 存在一些問題:

  • 1.在RAC環(huán)境下 透明大頁(Transparent HugePages )會(huì)導(dǎo)致異常節(jié)點(diǎn)重啟,和性能問題;
  • 2.在單機(jī)環(huán)境中,透明大頁(Transparent HugePages ) 也會(huì)導(dǎo)致一些異常的性能問題;

Transparent HugePages memory is enabled by default with Red Hat Enterprise Linux 6, SUSE Linux Enterprise Server 11, and Oracle Linux 6 with earlier releases of Oracle Linux Unbreakable Enterprise Kernel 2 (UEK2) kernels. Transparent HugePages memory is disabled in later releases of Oracle Linux UEK2 kernels.Transparent HugePages can cause memory allocation delays during runtime. To avoid performance issues, Oracle recommends that you disable Transparent HugePages on all Oracle Database servers. Oracle recommends that you instead use standard HugePages for enhanced performance.Transparent HugePages memory differs from standard HugePages memory because the kernel khugepaged thread allocates memory dynamically during runtime. Standard HugePages memory is pre-allocated at startup, and does not change during runtime.

Starting with RedHat 6, OEL 6, SLES 11 and UEK2 kernels, Transparent HugePages are implemented and enabled (default) in an attempt to improve the memory management. Transparent HugePages are similar to the HugePages that have been available in previous Linux releases. The main difference is that the Transparent HugePages are set up dynamically at run time by the khugepaged thread in kernel while the regular HugePages had to be preallocated at the boot up time. Because Transparent HugePages are known to cause unexpected node reboots and performance problems with RAC, Oracle strongly advises to disable the use of Transparent HugePages. In addition, Transparent Hugepages may cause problems even in a single-instance database environment with unexpected performance problems or delays. As such, Oracle recommends disabling Transparent HugePages on all Database servers running Oracle.

4:安裝Vertica Analytic Database時(shí)也必須關(guān)閉透明大頁功能。

到此這篇關(guān)于Linux關(guān)于透明大頁機(jī)制的文章就介紹到這了。希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持。

標(biāo)簽: Linux Apache
相關(guān)文章:
成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久
欧美日韩国产高清一区二区三区| 2023国产一二三区日本精品2022| 蜜桃久久av| 日韩一区二区三区免费看| 不卡欧美aaaaa| 91美女在线看| 欧美无人高清视频在线观看| 日韩美女精品在线| www.爱久久.com| 91国模大尺度私拍在线视频| 综合电影一区二区三区 | 亚洲国产日韩a在线播放性色| 不卡一卡二卡三乱码免费网站| 亚洲欧美成人综合| 国产精品私人自拍| 丁香啪啪综合成人亚洲小说 | 国产精品porn| 日韩一二三区视频| 蜜桃视频一区二区| 校园激情久久| 亚洲欧美日韩综合aⅴ视频| 91色在线porny| 在线综合+亚洲+欧美中文字幕| 亚洲成av人在线观看| 黄色综合网站| 国产欧美日韩不卡免费| 成人免费视频caoporn| 欧美日韩国产三级| 麻豆freexxxx性91精品| 亚洲欧美日韩精品综合在线观看| 日韩一区欧美一区| 黄色在线一区| 国产亚洲精品7777| 成人听书哪个软件好| 3d成人h动漫网站入口| 美女视频黄频大全不卡视频在线播放| 亚洲国产高清一区二区三区| 国产欧美日韩在线| 午夜激情一区| 中文字幕精品一区二区精品绿巨人| 99久久99久久免费精品蜜臀| 欧美刺激午夜性久久久久久久| 国产一区二区精品久久| 欧美亚洲禁片免费| 日本不卡的三区四区五区| 一本大道久久精品懂色aⅴ| 午夜国产精品一区| 久久aⅴ乱码一区二区三区| 亚洲国产日日夜夜| 国产麻豆综合| 亚洲国产精品久久人人爱| 国产精品久久久久久久久婷婷 | 国产精品久久久久永久免费观看 | 亚洲精品一区二区三区蜜桃久 | 午夜欧美在线一二页| 国产日韩一区二区| 亚洲午夜av在线| 日韩一级大片| 亚洲国产日韩在线一区模特| 亚洲免费影视| 视频在线观看一区二区三区| 国产伦精品一区二区三区高清版 | 亚洲精品福利视频网站| 一区二区三区免费网站| 久久久天堂av| 不卡一区二区三区四区| 91精品国产免费| 捆绑调教一区二区三区| 欧美日韩视频在线一区二区| 国产一区二区久久| 在线综合亚洲欧美在线视频| 成人亚洲一区二区一| 久久久久久久综合狠狠综合| 91美女蜜桃在线| 欧美激情艳妇裸体舞| 欧美日韩一区在线观看视频| 中文字幕一区二区三区在线观看 | 美女视频一区二区三区| 欧美日本高清视频在线观看| 欧美日韩一区二区三区四区| 亚洲黄色小视频| 亚洲激情二区| 同产精品九九九| 欧美精品自拍偷拍| 成人app软件下载大全免费| 国产亚洲综合av| 欧美日韩在线精品一区二区三区| 中文字幕亚洲区| 亚洲欧美大片| 黑人精品欧美一区二区蜜桃| 精品成人一区二区三区四区| 欧美日韩亚洲一区二区三区在线观看 | 精品99999| 亚洲精品男同| 韩国成人福利片在线播放| 国产日韩欧美麻豆| 91福利国产成人精品照片| 你懂的网址国产 欧美| 五月综合激情日本mⅴ| 国产人成一区二区三区影院| 欧美性大战久久久久久久蜜臀| 黑人一区二区| 成人一级片网址| 天天色天天操综合| 久久亚洲精品国产精品紫薇| 久久精品人人| 欧美一区激情| 久久成人av少妇免费| 亚洲图片激情小说| 日韩欧美一级片| 久久一区国产| 在线观看欧美亚洲| 成人黄色一级视频| 蜜桃久久av一区| 亚洲三级理论片| 久久色在线视频| 在线观看免费成人| 亚洲视频导航| 色综合视频在线观看| 六月丁香婷婷久久| 一区二区三区波多野结衣在线观看| 久久中文娱乐网| 欧美日韩三级视频| 久久精品系列| 亚洲第一黄色| 91麻豆文化传媒在线观看| 狂野欧美性猛交blacked| 亚洲另类春色校园小说| 久久女同精品一区二区| 欧美高清一级片在线| 久久久久一区| 国产日韩欧美在线播放不卡| 91麻豆视频网站| 国产精品亚洲一区二区三区在线| 亚洲成人福利片| 亚洲三级电影全部在线观看高清| 欧美成人在线直播| 欧美精品一二三| 欧美亚洲一区二区在线观看| 亚洲欧美日韩在线综合| 极品裸体白嫩激情啪啪国产精品| 成人高清免费观看| 国产一区二区不卡在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲欧美偷拍另类a∨色屁股| 日本一区二区三区dvd视频在线| 欧美成人艳星乳罩| 日韩一区二区三区电影在线观看| 在线观看日韩一区| 麻豆九一精品爱看视频在线观看免费| 精品999日本| 欧美片网站免费| 91影院在线免费观看| 高清不卡一二三区| 国产另类ts人妖一区二区| 免费一级片91| 日本色综合中文字幕| 午夜欧美电影在线观看| 亚洲国产人成综合网站| 亚洲综合丝袜美腿| 一区二区三区蜜桃| 亚洲免费视频中文字幕| 亚洲欧美二区三区| 亚洲欧美国产77777| 1000部国产精品成人观看| 国产精品免费久久久久| 国产网站一区二区| 国产天堂亚洲国产碰碰| 久久先锋影音av| wwwwww.欧美系列| 日韩三级免费观看| 国产精品日产欧美久久久久| 国产蜜臀av在线一区二区三区| 国产欧美日韩亚州综合 | 久久免费视频色| 久久综合色综合88| 国产视频一区在线观看| 久久久国产精品不卡| 国产日韩精品一区| 国产精品乱子久久久久| 中文字幕一区二区三区av| 自拍视频在线观看一区二区| 亚洲精品免费一二三区| 亚洲一区二区三区四区在线观看 | 一区二区三区在线播| 依依成人精品视频| 亚洲一二三四在线| 天天色综合成人网| 九九国产精品视频| 国产成人精品www牛牛影视| www.日本不卡| 欧美精品一卡| 亚洲国产精品www| 性欧美xxxx大乳国产app| 久热国产精品| 欧美日韩国产一级二级| 日韩欧美国产系列| 中国av一区二区三区| 中文字幕视频一区| 日韩欧美在线观看一区二区三区|