Linux Redhat 7.9关闭内存管理特性
1 关闭大页内存
[root@db1 ~]# cat /sys/kernel/mm/transparent_hugepage/defrag
[always] madvise never
[root@db1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/enabled
chmod u+x /etc/rc.d/rc.local (忘记加权限了导致多次重启主机shit)
echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' >> /etc/rc.d/rc.local
echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.d/rc.local
3.验证是否关闭了透明大页
[root@eomsdb1 ~]# grep Huge /proc/meminfo
AnonHugePages: 83968 kB
HugePages_Total: 0 #success
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
[root@eomsdb1 ~]# cat /proc/sys/vm/nr_hugepages
0
#success
2 开启大页内存
echo always > /sys/kernel/mm/transparent_hugepage/enabled
echo always > /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/enabled
3 禁用numa特性
一、检查OS是否开启NUMA
# cat /proc/cmdline root=LABEL=DBSYS ro bootarea=dbsys rhgb quiet console=ttyS0,115200n8 console=tty1 crashkernel=128M@16M numa=off # numactl --hardwaredmesg|grep -i numa文章来源地址https://www.toymoban.com/news/detail-704268.html
备份numa文件
cp /etc/default/grub /etc/default/grub2023bak
vi /etc/default/grub
在 GRUB_CMDLINE_LINUX 参数的末尾增加 : numa=off
例如:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=vg_root/root rd.lvm.lv=vg_root/swap rhgb quiet numa=off"
重建grub 配置文件
MBR 分区表
grub2-mkconfig -o /etc/grub2.cfg
efi 引导模式, efi + GPT分区表
grub2-mkconfig -o /etc/grub2-efi.cfg
重启机器,再来检查numa 是否被关闭即可文章来源:https://www.toymoban.com/news/detail-704268.html
dmesg|grep -i numa
到了这里,关于Oracle集群管理-19C集群禁用numa和大页内存特性的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!