禁用透明HugePages-創(chuàng)新互聯(lián)

1.檢查是否已啟用Transparent HugePages
紅帽企業(yè)Linux內(nèi)核:

創(chuàng)新互聯(lián)公司堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站建設(shè)、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的興安網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!#?cat?/sys/kernel/mm/redhat_transparent_hugepage/enabled

其他內(nèi)核:

#?cat?/sys/kernel/mm/transparent_hugepage/enabled [always]?madvise?never??<<----?[always]標(biāo)志?THP?is?enabled? 如果從內(nèi)核中刪除Transparent?HugePages,則既不存在/sys/kernel/mm/transparent_hugepage 也不/sys/kernel/mm/redhat_transparent_hugepage?files存在。

2.禁用透明HugePages:

OL 7:

1.編輯tuned.conf [root@prodb?~]#?uname?-r 4.1.12-112.16.4.el7uek.x86_64 [root@prodb?~]#?cat?/sys/kernel/mm/transparent_hugepage/enabled? always?madvise?[never] [root@prodb?~]#?cd?/usr/lib/tuned/throughput-performance/ [root@prodb?~]#?cp?tuned.conf?tuned.conf.bak [vm] ?transparent_hugepages=always ?to? [vm] transparent_hugepages=never 2.重啟 #?shutdown?-r?now 3.校驗(yàn) [root@prodb?~]#?uname?-r 4.1.12-112.16.4.el7uek.x86_64 [root@prodb?~]#?cat?/sys/kernel/mm/transparent_hugepage/enabled? always?madvise?[never]??<<---?THP?Disabled #?cat?/proc/cmdline BOOT_IMAGE=/vmlinuz-4.1.12-112.16.4.el7uek.x86_64?....?transparent_hugepage=never 如果未生效,按如下方法設(shè)置: 1.檢查profile #?tuned-adm?active Current?active?profile:?virtual-guest?<<---?Virtual-guest?is?the?active?profile 2.修改tuned.conf #cp?/usr/lib/tuned/virtual-guest/tuned.conf?/usr/lib/tuned/virtual-guest/tuned.conf.bkp_original 增加以下內(nèi)容: [main] include=throughput-performance [vm] transparent_hugepages=never 3.重啟 #?shutdown?-r?now 4.校驗(yàn) [root@prodb?~]#?uname?-r [root@prodb?~]#?cat?/sys/kernel/mm/transparent_hugepage/enabled? #?cat?/proc/cmdline

RHEL 7:

1.編輯grub.conf 在GRUB_CMDLINE_LINUX末尾添加transparent_hugepage=never? #vim?/etc/default/grub GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root?rd.lvm.lv=rhel/swap?...?transparent_hugepage=never" 2.Rebuild?grub On?BIOS-based?machines:?~]#?grub2-mkconfig?-o?/boot/grub2/grub.cfg On?UEFI-based?machines:?~]#?grub2-mkconfig?-o?/boot/efi/EFI/redhat/grub.cfg 3.reboot #?shutdown?-r?now 4.校驗(yàn) #?cat?/proc/cmdline BOOT_IMAGE=/vmlinuz-4.1.12-112.16.4.el7uek.x86_64?....?transparent_hugepage=never 如果未生效,按如下方法設(shè)置: 1.檢查profile #?tuned-adm?active 2.自定義profile #?mkdir?/etc/tuned/myprofile-nothp #?cat?/etc/tuned/myprofile-nothp/tuned.conf [main] include=?throughput-performance [vm] transparent_hugepages=never 3.激活配置文件 #?chmod?+x?/etc/tuned/myprofile-nothp/tuned.conf #?tuned-adm?profile?myprofile-nothp 4.重啟校驗(yàn) #?shutdown?-r?now #?cat?/sys/kernel/mm/transparent_hugepage/enabled 5.關(guān)閉服務(wù) #?systemctl?stop?tuned #?systemctl?disable?tuned #?systemctl?stop?ktune #?systemctl?disable?ktune 或者 #?tuned-adm?off THP?status?in?other?UEK?kernel?versions UEK3?disabled?by?default?? [root@ol6?~]#?grep?-i?CONFIG_TRANSPARENT_HUGEPAGE?/boot/config-3.8.13-118.6.2.el6uek.x86_64 #?CONFIG_TRANSPARENT_HUGEPAGE?is?not?set?? UEK4?enabled?by?default [root@ol7?~]#?grep?-i?CONFIG_TRANSPARENT_HUGEPAGE?/boot/config-4.1.12-37.2.2.el7uek.x86_64 CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y

RHEL 6或更低版本

啟用狀態(tài)為[always] #?cat?/sys/kernel/mm/[hedhat_]transparent_hugepage/enabled [always]?never 或者查詢以下內(nèi)容 #?grep?AnonHugePages?/proc/meminfo AnonHugepages:?xxxx?kB 要求XXXX>0 禁用狀態(tài)為[never] #?cat?/sys/kernel/mm/[hedhat_]transparent_hugepage/enabled always?[never] 禁用huge 1.編輯grub.conf? #vi??/etc/grub.conf? kernel?/vmlinuz-2.6.32-300.25.1.el6uek.x86_64?ro?root=LABEL=/?transparent_hugepage=never 或者 #vi?/etc/rc.local if?test?-f?/sys/kernel/mm/transparent_hugepage/enabled;?then ???echo?never?>?/sys/kernel/mm/transparent_hugepage/enabled fi if?test?-f?/sys/kernel/mm/transparent_hugepage/defrag;?then ???echo?never?>?/sys/kernel/mm/transparent_hugepage/defrag fi 2.重啟生效

引用:

ALERT:?Disable?Transparent?HugePages?on?SLES11,?RHEL6,?RHEL7,?OL6,?OL7,?and?UEK2?and?above?(文檔?ID?1557478.1)?? NOTE:2066217.1?-?Oracle?Linux?7?-?How?to?disable?Transparent?HugePages?for?RHCK?kernel??? (How?to?disable?transparent?hugepages?(THP)?on?Red?Hat?Enterprise?Linux?7)

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

新聞名稱:禁用透明HugePages-創(chuàng)新互聯(lián)
瀏覽地址:http://muchs.cn/article4/csjgoe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開(kāi)發(fā)、定制開(kāi)發(fā)、定制網(wǎng)站軟件開(kāi)發(fā)App開(kāi)發(fā)、營(yíng)銷型網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都app開(kāi)發(fā)公司