日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区

您的位置:首頁技術文章
文章詳情頁

Linux關于透明大頁機制的介紹

瀏覽:420日期: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系統

[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系統

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

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

3:如何HugePages_Total返回0,也意味著標準大頁禁用了(注意傳統/標準大頁和透明大頁的區別)

透明大頁(THP)管理和標準/傳統大頁(HP)管理都是操作系統為了減少頁表轉換消耗的資源而發布的新特性,雖然ORACLE建議利用大頁機制來提高數據庫的性能,但是ORACLE卻同時建議關閉透明大頁管理。這二者的區別在于大頁的分配機制,標準大頁管理是預分配的方式,而透明大頁管理則是動態分配的方式。

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

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

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

禁用、啟用透明大頁功能

方法1:設置/etc/grub.conf文件,在系統啟動是禁用。

[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:設置/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

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

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 ~]# 

小知識點:

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

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 時的開啟透明大頁(Transparent HugePages ), 因為透明大頁(Transparent HugePages ) 存在一些問題:

  • 1.在RAC環境下 透明大頁(Transparent HugePages )會導致異常節點重啟,和性能問題;
  • 2.在單機環境中,透明大頁(Transparent HugePages ) 也會導致一些異常的性能問題;

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時也必須關閉透明大頁功能。

到此這篇關于Linux關于透明大頁機制的文章就介紹到這了。希望對大家的學習有所幫助,也希望大家多多支持。

標簽: Linux Apache
相關文章:
日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
国产模特精品视频久久久久| 99精品电影| 悠悠资源网久久精品| 97在线精品| 中文字幕在线视频网站| 中文字幕人成乱码在线观看| 91中文字幕精品永久在线| 成人va天堂| 女主播福利一区| 国产精品日本| 蜜臀久久99精品久久久久久9| 亚洲一区二区日韩| 老色鬼久久亚洲一区二区| 亚洲另类av| 97se亚洲| 国产一区二区三区不卡av| 福利一区在线| 久久蜜桃精品| 久久先锋影音| 日韩欧美在线精品| 国产精品主播| 一本大道色婷婷在线| 久久久久久久久99精品大| 日韩一区二区久久| 日本v片在线高清不卡在线观看| 欧美片第1页综合| 久久精品国产网站| 成人看片网站| 亚洲欧美日本日韩| 日本午夜精品| av最新在线| 国产美女一区| 国产精品伦一区二区| 国产在线观看www| 好吊一区二区三区| 久久国产尿小便嘘嘘| 欧美日韩免费观看视频| 久久高清免费观看| 国产精品密蕾丝视频下载| 亚洲a一区二区三区| 亚洲精品在线二区| 国产美女高潮在线观看| 午夜在线观看免费一区| 日本欧美一区二区| 丰满少妇一区| 视频一区欧美日韩| 欧美成人aaa| 一区久久精品| 国产精品一区二区美女视频免费看| 日韩欧美一区二区三区免费看| 亚洲欧美不卡| 国产成人免费av一区二区午夜| 欧美日韩精品免费观看视频完整| 日韩高清不卡在线| 伊人久久高清| 91亚洲无吗| 私拍精品福利视频在线一区| 日韩 欧美一区二区三区| 狂野欧美性猛交xxxx| 免费毛片在线不卡| 国产精品xxx| 国产亚洲高清视频| 精品视频久久| 日韩综合小视频| 久久久国产精品一区二区中文| 亚洲精品少妇| 国产99久久| 国产毛片一区二区三区 | 精品日韩在线| 中文不卡在线| 福利一区和二区| 亚洲色图国产| 久久久久国产精品一区三寸| 日本一区二区三区视频在线看| 在线亚洲人成| 国产日韩一区| 蜜臀精品久久久久久蜜臀 | 欧美中文字幕| 国产传媒在线| 国产精品videosex极品| 亚洲欧美高清| 久久精品亚洲人成影院| 国产精品乱战久久久| 国产午夜久久| 91精品国产福利在线观看麻豆| 欧美国产精品| 日韩精品午夜视频| 亚洲一区激情| 欧美a级一区| 欧美激情另类| 麻豆91精品91久久久的内涵| 亚洲日本在线观看视频| 久久国产亚洲| 91综合视频| 你懂的国产精品永久在线| 亚洲v天堂v手机在线| 亚洲综合欧美| 影院欧美亚洲| 久久人人精品| 91亚洲国产| 精品久久福利| 精品网站aaa| 久久久久久久久成人| 国产精品一线天粉嫩av| 青青草国产精品亚洲专区无| 亚洲无线观看| 在线精品一区二区| 久久大逼视频| 亚洲一区成人| 亚洲欧美日韩专区| 日韩视频一区| 91久久亚洲| 国产亚洲福利| 亚洲免费观看| 久久福利一区| 综合一区av| 日本伊人午夜精品| 日本欧美大码aⅴ在线播放| 日韩精品视频一区二区三区| 日本h片久久| 国产精品一区二区三区av麻| 久久国产精品免费一区二区三区| 清纯唯美亚洲综合一区| 91综合久久爱com| 国产亚洲精aa在线看| 久久激情五月婷婷| 国产精品一站二站| 你懂的亚洲视频| 麻豆一区二区三| 精品三级久久久| 蜜臀久久精品| 女人天堂亚洲aⅴ在线观看| 亚洲主播在线| 日韩中文av| 国产精品久久久亚洲一区| 精品国产不卡| 亚洲一级少妇| 亚洲免费高清| 日韩1区2区3区| 麻豆视频久久| 日韩av首页| 久久性天堂网| 国产日韩视频| 精品三级国产| 欧美日韩一区二区三区视频播放| 国产亚洲一级| 欧美一区网站| 91综合网人人| 99在线精品免费视频九九视| 最新国产精品视频| 国产精成人品2018| 日韩一区二区在线免费| 在线亚洲精品| 97se亚洲| 日韩在线短视频| 免费在线成人网| 免费亚洲一区| 激情自拍一区| 亚洲人成网站在线在线观看| 国产精品蜜月aⅴ在线| 国产成人精品亚洲日本在线观看| 好吊日精品视频| 日本不卡不码高清免费观看| 久久精品国产久精国产| 国产一在线精品一区在线观看| 蜜臀精品一区二区三区在线观看| 国产日本久久| 深夜视频一区二区| 在线日韩成人| 精品99在线| 日韩视频一区| 国产精品午夜一区二区三区| 精品一区二区三区亚洲| 国产精品成人一区二区网站软件| 麻豆亚洲精品| 国产精品一线| 亚洲小说欧美另类婷婷| 在线视频亚洲欧美中文| 精品一区二区三区中文字幕视频| 香蕉人人精品| 国产精品一区二区精品视频观看| 深夜视频一区二区| 日韩精品1区2区3区| 欧洲av不卡| 日韩福利视频网| 99久久99久久精品国产片果冰 | 国产模特精品视频久久久久| 国产欧美日韩精品一区二区三区| 成人在线视频免费看| 性欧美长视频| 国产一区二区三区亚洲综合| 蜜桃久久精品一区二区| 国产夫妻在线| 日韩福利在线观看| 精品在线91| 国产一区二区三区久久| 婷婷综合国产| 欧美日韩国产一区二区三区不卡| 欧美激情日韩| 伊人国产精品|