• Exadata使用技巧 (-)


    1. 概述

    Exadata数据库一体机已经经过多年的风雨磨砺修炼为X6版本;在中国Exadata也有着众多的成功案例,基于Oracle原厂和众多服务商的努力,我们对Exadata的使用也越来越成熟。 以下是常用的使用技巧,供大家参考。

    clip_image002

     

    clip_image004

    2. Exadata管理

    2.1 Exadata性能优化

    让表使用flash cache

    ALTER TABLE <object name> storage (CELL_FLASH_CACHE KEEP);

    可以使用如下公式计算Exadata特性对IO的优化

    [ 1 – {(cell physical IO interconnect bytes returned by smart scan) / (cell IO uncompressed bytes + cell physical IO bytes saved by storage index)} ] * 100

    可以使用如下公式计算Exadata Storage Index对Disk IO减少的共享

    (cell physical IO bytes saved by storage index / physical read total bytes) * 100

    可以使用如下计算Flash Cache的使用率

    (cell flash cache read hit / physical read total IO requests) * 100

    2.2 收集cell级别的表缓存统计信息的方法

    收集cell级别的表缓存统计信息的方法

    SQL> SELECT data_object_id FROM DBA_OBJECTS WHERE object_name=’EMP’;

    OBJECT_ID

    ———

    57435

    CellCLI> LIST FLASHCACHECONTENT –

    WHERE objectNumber=57435 DETAIL cachedSize: 495438874

    dbID: 70052

    hitCount: 415483

    missCount: 2059

    objectNumber: 57435

    tableSpaceNumber: 1

    2.3 使用write back flash cache

    #dcli -g ~/cell_group -l root cellcli -e “list cell attributes flashcachemode”

    Results:

    flashCacheMode: WriteBack -> write back flash cache is enabled

    flashCacheMode: WriteThrough -> write back flash cache is not enabled

    2.4 确认griddisk和flashdisk状态

    确认所有的griddisk均为正常online状态

    # dcli -g cell_group -l root cellcli -e list griddisk attributes asmdeactivationoutcome, asmmodestatus

    确认所有的flashdisk均为正常online状态

    # dcli -g cell_group -l root cellcli -e list flashcache detail

    2.5 启用write back flash cache

    A. Enable Write Back Flash Cache using a ROLLING method

    (RDBMS & ASM instance is up – enabling write-back flashcache one cell at a time)

    Log onto the first cell that you wish to enable write-back FlashCache

    1. Drop the flash cache on that cell

    # cellcli -e drop flashcache

    2. Check if ASM will be OK if the grid disks go OFFLINE. The following command should return ‘Yes’ for the grid disks being listed:

    # cellcli -e list griddisk attributes name,asmmodestatus,asmdeactivationoutcome

    3. Inactivate the griddisk on the cell

    # cellcli –e alter griddisk all inactive

    4. Shut down cellsrv service

    # cellcli -e alter cell shutdown services cellsrv

    5. Set the cell flashcache mode to writeback

    # cellcli -e “alter cell flashCacheMode=writeback”

    6. Restart the cellsrv service

    # cellcli -e alter cell startup services cellsrv

    7. Reactivate the griddisks on the cell

    # cellcli –e alter griddisk all active

    8. Verify all grid disks have been successfully put online using the following command:

    # cellcli -e list griddisk attributes name, asmmodestatus

    9. Recreate the flash cache

    # cellcli -e create flashcache all

    10. Check the status of the cell to confirm that it’s now in WriteBack mode:

    # cellcli -e list cell detail | grep flashCacheMode

    11. Repeat these same steps again on the next cell. However, before taking another storage server offline, execute the following making sure ‘asmdeactivationoutcome’ displays YES:

    # cellcli -e list griddisk attributes name,asmmodestatus,asmdeactivationoutcome

    B . Enable Write Back Flash Cache using a NON-ROLLING method

    (RDBMS & ASM instances are down while enabling write-back flashcache)

    1. Drop the flash cache on that cell

    # cellcli -e drop flashcache

    2. Shut down cellsrv service

    # cellcli -e alter cell shutdown services cellsrv

    3. Set the cell flashcache mode to writeback

    # cellcli -e “alter cell flashCacheMode=writeback”

    4. Restart the cellsrv service

    # cellcli -e alter cell startup services cellsrv

    5. Recreate the flash cache

    # cellcli -e create flashcache all

    2.6 exadata计算节点网络带宽

    确认Exadata 计算节点间的网络带宽

    可以采用nc nc-1.84-10.fc6.x86_64.rpm获得

    2.7 检查RDS是否可用

    检测多个ORACLE_HOME是否RDS可用?

    dcli -g /opt/oracle.SupportTools/onecommand/dbs_group -l oracle md5sum ${ORACLE_HOME}/lib/libskgxp11.so

    relink ORACLE_HOME的RDS

    dcli -g /opt/oracle.SupportTools/onecommand/dbs_group -l oracle “export ORACLE_HOME=$ORACLE_HOME;;cd `pwd`;;make – f i*mk ipc_rds”

    dcli -g /opt/oracle.SupportTools/onecommand/dbs_group -l oracle “export ORACLE_HOME=$ORACLE_HOME;;cd `pwd`;;make – f i*mk ioracle” | egrep 'rm|mv.*oracle'

    2.8 Exadata最大并行度

    配置 CPU个数 推荐最大Parallelism

    Full Rack 64 core DOP=256

    Half Rack 32 core DOP=128

    Quarter Rack 16 core DOP=64

    2.9 Exadata EHCC支持

    Exadata的EHCC支持宽表 最大支持1000个字段的表,而不像11.1中的压缩仅支持最多255列的表

    2.10 Exadata 压缩信息

    通过dbms_compression.get_compression_ratio 可以获得表的压缩信息

    2.11 启用Smart Flash logging特性

    针对写日志redo特别多的应用建议启用Smart Flash logging特性

    CREATE FLASHLOG ALL

    CREATE FLASHLOG ALL SIZE=1G

    CREATE FLASHLOG CELLDISK=’fd1,fd2′

    CREATE FLASHLOG CELLDISK=’fd1,fd2′ SIZE=1G

    3. Exadata DB管理

    3.1 Exadata存储空间计算

    FreeMB(最大可用空间) =

    GridDisk*12*Num of Cells/Redundancy

    UsableMB (支持1个CELL故障的最大可用空间) =

    GridDisk*12*(Num of Cells – 1) /Redundancy

    3.2 查看cell软件版本

    imagehistory

    imageinfo

    3.3 cell的温度

    dcli -g cell_group -l root “ipmitool sensor | grep ‘Inlet Amb Temp'”

    3.4 cell存储节点的日志存放位置

    $ADR_BASE/diag/asm/cell/`hostname`/trace/alert.log $ADR_BASE/diag/asm/cell/`hostname`/trace/ms-odl.* $ADR_BASE/diag/asm/cell/`hostname`/trace/svtrc__0.trc — ps -ef | grep “cellsrv 100” $ADR_BASE/diag/asm/cell/`hostname`/incident/*

    /var/log/messages*, dmesg /var/log/sa/*

    /var/log/cellos/*

    3.5 cell中的alert history

    list alerthistory where notificationState like ‘[023]’ and severity like ‘[warning|critical]’ and examinedBy = NULL;

    3.6 cell创建一个告警阈值

    cellcli

    create threshold CD_IO_ERRS_MIN warning=1, comparison=’>=’, occurrences=1, observation=1;

    3.7 cell可用性监控

    一般建议使用 EMGC Oracle Exadata Storage Server Management Plug-In 监控

    3.8 禁用Smart Scan

    设置 Cell_offload_processing=false

    3.9 禁用storage index

    设置 _kcfis_storageidx_disabled=true

    3.10 禁用flash cache

    11.2.0.2 以后 设置_kcfis_keep_in_cellfc_enabled=false

    11.2.0.1中设置_kcfis_control1=1

    3.11 Cell相关数据库视图

    select * from sys.GV_$CELL_STATE;

    select * from sys.GV_$CELL;

    select * from sys.GV_$CELL_THREAD_HISTORY;

    select * from sys.GV_$CELL_REQUEST_TOTALS;

    select * from sys.GV_$CELL_CONFIG;

    3.12 配置Inter-Database IORM

    CellCLI> alter iormplan –

    dbplan = ((name = production, level = 1, allocation = 100), –

    (name = test, level = 2, allocation = 80), –

    (name = other, level = 2, allocation = 20))

    IORMPLAN successfully altered

    CellCLI> alter iormplan active

    IORMPLAN successfully altered

    CellCLI> list iormplan detail

    name: cell4_IORMPLAN

    catPlan:

    dbPlan: name=production,level=1,allocation=100

    name=test,level=2,allocation=80

    name=other,level=2,allocation=20

    status: active

    3.13 禁用布隆过滤Bloom Fliter

    设置_bloom_pruning_enabled=false

    4. Exadata数据备份与恢复

    4.1 backup备份速率

    Exadata下rman备份的速率从1通道到8通道 大约为1003MB/s 到 2081MB/s,视乎配置不同也略微有区别

    4.2 recovery应用日志恢复速率

    exadata recovery的速率大约为每秒600~1000MB/s的归档日志

    4.3 standby database搭建

    对于50TB的standby database搭建,若使用infiniband + 4rman通道大约耗费5.5小时,若使用GigE则在18个小时左右

    4.4 Exadata恢复

    cell 救护

    可以通过

    /opt/oracle.SupportTools/make_cellboot_usb脚本创建内部USB cellboot_usb_in_rescure_mode

    5. Exadata部署

    5.1 onecommand下载

    可以下载patch (9935478) ONECOMMAND FOR Exadata 11gR2

    5.2 Exadata安装前准备工作

    1. 下载安装介质包括Grid, Database,Patches等

    2. 硬件设备到货验收并安装就绪

    3. 规划DBM用的管理网,生产网,ILOM等用的网段和IP地址

    4. 配置DNS服务器

    5. 将IP地址和域名注册到DNS服务器

    6. 配置NTP服务器

    7. 网络连线

    5.3 环境检查

    1. 检查DBM主机的eth0网卡是否可以通过cisco交换机被访问

    2. 检查hardware and firmware profile是否正确

    3. 验证InfiniBand Network

    5.4 验证网络连通性

    1. 登陆第一台数据库服务器使用sh脚本验证网络连通性

    2. 验证DNS是否正常

    3. 验证NTP 服务器是否正常

    5.5 安装Exadata Storage Server Image Patch

    备注:(root user)

    1. 在db server和cell server上为root用户配置SSH

    # /opt/oracle.SupportTools/onecommand/setssh.sh -s -u root -p password -n N -h dbs_group

    2. 检查当前Cell storage server的Exadata Image 版本

    3. 安装最新的Patch具体步骤详见Readme

    4. 验证当前Exadata Image version

    #cd /opt/oracle.SupportTools/firstconf

    #dcli -l root -g quarter ‘imagehistory | grep –i Version

    使用OneCommand工具完成DBM的配置安装

    1. #cd /opt/oracle.SupportTools/onecommand

    2. Display the onecommand steps

    # ./deploy112.sh -i –l

    3. The steps in order are…

    Step 0 = ValidateThisNodeSetup

    Step 1 = SetupSSHForRoot

    Step 2 = ValidateAllNodes

    Step 3 = UnzipFiles

    Step 4 = UpdateEtcHosts

    Step 5 = CreateCellipnitora

    Step 6 = ValidateHW

    Step 7 = ValidateIB

    Step 8 = ValidateCell

    Step 9 = PingRdsCheck

    Step 10 = RunCalibrate

    Step 11 = ValidateTimeDate

    Step 12 = UpdateConfig

    Step 13 = CreateUserAccounts

    Step 14 = SetupSSHForUsers

    Step 15 = CreateOraHomes

    Step 16 = CreateGridDisks

    Step 17 = InstallGridSoftware

    Step 18 = RunGridRootScripts

    Step 19 = Install112DBSoftware

    Step 20 = Create112Listener

    Step 21 = RunAsmCa

    Step 22 = UnlockGIHome

    Step 23 = UpdateOPatch

    Step 24 = ApplyBP

    Step 25 = RelinkRDS

    Step 26 = LockUpGI

    Step 27 = SetupCellEmailAlerts

    Step 28 = RunDbca

    Step 29 = SetupEMDbControl

    Step 30 = ApplySecurityFixes

    Step 31 = ResecureMachine

    To run a command

    #./deploy112.sh –i –s N

    Where N corresponds to a step number

    Example to run step 0

    6. Exadata监控

    6.1 exachk健康检查脚本

    exachk脚本可以以daemon形式后台运行

    ./exachk –d start

    以daemon形式cluster support运行

    ./exachk –clusternodes [node1,[node N]] –d start!

    6.2 Exadata文档信息

    Exadata的官方文档 http://docs.oracle.com/cd/E50790_01/welcome.html

    另外文档还保存在您cell 的 /opt/oracle/cell/doc/ 目录下。

  • 相关阅读:
    Session的使用与Session的生命周期
    Long-Polling, Websockets, SSE(Server-Sent Event), WebRTC 之间的区别与使用
    十九、详述 IntelliJ IDEA 之 添加 jar 包
    十八、IntelliJ IDEA 常用快捷键 之 Windows 版
    十七、IntelliJ IDEA 中的 Maven 项目初体验及搭建 Spring MVC 框架
    十六、详述 IntelliJ IDEA 创建 Maven 项目及设置 java 源目录的方法
    十五、详述 IntelliJ IDEA 插件的安装及使用方法
    十四、详述 IntelliJ IDEA 提交代码前的 Code Analysis 机制
    十三、IntelliJ IDEA 中的版本控制介绍(下)
    十二、IntelliJ IDEA 中的版本控制介绍(中)
  • 原文地址:https://www.cnblogs.com/rencheng/p/6618891.html
Copyright © 2020-2023  润新知