orachk 的幾個waring 解決辦法

jhon_lee發表於2015-01-16
waring 1: 
WARNING ASM Check Linux Disk I/O Scheduler should be configured to [Deadline] All ASM Instances

做了如下修改:

[root@bcc1 ~]# echo 'deadline' > /sys/block/sda/queue/scheduler
[root@bcc1 ~]# cat /sys/block/sda/queue/scheduler 
noop anticipatory [deadline] cfq 


要配置在重啟後任然有效:

[root@bcc1 ~]# 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/bcc1sysvg-bcc1rootlv 
# initrd /initrd-[generic-]version.img 
#boot=/dev/sda 
default=0 
timeout=5 
splashimage=(hd0,0)/grub/splash.xpm.gz 
hiddenmenu 
title Red Hat Enterprise Linux (2.6.32-431.el6.x86_64) 
root (hd0,0) 
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/bcc1sysvg-bcc1rootlv elevator=deadline rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=bcc1sysvg/bcc1rootlv rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=bcc1sysvg/bcc1swaplv KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet rd_NO_DM rhgb quiet 
initrd /initramfs-2.6.32-431.el6.x86_64.img 

需要在reboot之後生效


waring 2:

WARNING OS Check Linux transparent huge pages are enabled All Database Servers

# 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

經測試在rhel 6上,必須在 grub.conf檔案中配置,重啟之後,才會生效。
[root@bcc1 ~]# 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/bcc1sysvg-bcc1rootlv
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.32-431.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/bcc1sysvg-bcc1rootlv transparent_hugepage=never elevator=deadline rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=bcc1sysvg/bcc1rootlv rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=bcc1sysvg/bcc1swaplv  KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-431.el6.x86_64.img
需要在reboot後生效


waring 3:

WARNING OS Check vm.min_free_kbytes should be set as recommended. All Database Servers


做了如下修改:

[root@bcc2 ~]# cat /etc/sysctl.conf | grep vm.min_free_kbytes 
vm.min_free_kbytes = 524288


[root@bcc2 ~]# sysctl -n vm.min_free_kbytes 
524288 



針對waring:

WARNING ASM Check ASM memory_target is not set to recommended value for Linux All ASM Instances
WARNING ASM Check ASM SGA_TARGET is not set to recommended value All ASM Instances

在 11g之後oracle建議asm的記憶體大小為>=1024 MB 可是在預設安裝asm時,只賦予了512 MB,所以在rac安裝之後,將asm 例項的記憶體調大。  

SQL> show parameter mem 

NAME TYPE VALUE 
------------------------------------ ----------- ------------------------------ 
memory_max_target big integer 1G 
memory_target big integer 432M 
SQL> show parameter ga 

NAME TYPE VALUE 
------------------------------------ ----------- ------------------------------ 
lock_sga boolean FALSE 
pga_aggregate_target big integer 0 
sga_max_size big integer 1G 
sga_target big integer 0



SQL> alter system set memory_target=0 scope=spfile sid='*'; 


System altered.


SQL> alter system set sga_target=1g scope=spfile sid='*'; 

System altered.

需要在重啟ASM之後生效。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26474945/viewspace-1403765/,如需轉載,請註明出處,否則將追究法律責任。

相關文章