Oracle 11g的ASM有两个有意思的特性,我们看看他们能带给我们什么?

1.Fast mirror resync

原来当diskgroup中的盘发生故障时,Oracle会将这个盘标记为offline状态,并在一定的时间内从diskgroup中drop掉这块磁盘。如果disk只是临时性的故障,那么当故障恢复时,需要同步这块盘的全部内容,尤其是当某个failure group的全部磁盘都出现问题,比如我们的存储某个节点临时性断电,这时要重新build整个failure group中的所有磁盘,这个操作会非常耗费系统的资源,而是同步的过程会很长。

fast mirror resync这个特性在发生故障时,记录数据变化,然后当磁盘恢复时,只需要同步这些变化内容,让同步的时间变得很短。DISK_REPAIR_TIME这个参数控制可以恢复的时间长短,如果故障超过这个时间,Oracle将从diskgroup中drop这块盘。

比较有意思的问题,第一个是Oracle如何记录这些变化?文档中并没有明确说明,但是我猜测是用位图方式来实现,即用位图来标识哪个extent发生了变化,然后当故障恢复时同步这个extent即可,因为位图占用的空间很小,这样就可以记录很长时间的变化。第二个是如果整个磁盘都坏掉,换了一块新的磁盘,这时必须同步这个磁盘的所有内容,fast mirror resync就失效了。

2.Preferred mirror read

ASM中mirror有primary copy和secondary copy,ASM总是读primary copy的内容,但是ASM会将不同extent的primary和secondary copy放在不同的failure group中,比如extent 1的primary在failgroup1,secondary在failgroup2,而extent2则刚好相反,用这种方式来实现负载均衡。

Preferred mirror read可以控制Oracle优先读取某个failure group上的copy,这个特性在RAC上很有用,我们可以控制RAC的节点优先读取离自己最“近”的存储,我突发奇想,设计一个两节点的RAC系统,利用iscsi来共享自己的磁盘给对方,然后利用这个特性,控制每个节点去读自己的本地磁盘。

下图这个方案,我们选用两台PC server,没有共享的存储,每台PC24块盘,如果追求吞吐量,用SAS/SATA盘,如果追求IOPS,可以用ssd盘。用iscsi将本地磁盘输出给地方节点,形成共享存储,RAC节点间互连可以用直连或交换方式。ASM中分别将两个PC的磁盘定位为单独的failgroup,利用preferred mirror read,让每个节点优先读取自己的本地failgroup中的extent copy.

ASM Preferred Mirror Read

Your ASM configuration may involve remote mirroring to disks that are a fair distance away. When some of your disk mirrors are far away then those disks may not be the best set of disks for a given instance to read from. For example, you might have a Real Application Cluster database with local and remote mirrored disks. In this case, you want to have the RAC instances primarily read from the local disks to ensure the best performance. ASM preferred mirror read is designed to indicate to Oracle which disk failgroup is the preferred read disk group.

ASM preferred mirror read is only available if you are using RAC. Also preferred mirror read is generally used only with clustered ASM instances, but this is not a requirement. To take advantage of ASM preferred mirror read, you should configure each disk failure group with specific geographically located set of disks. Use the Oracle 11g parameter, asm_preferred_read_failure_groups, to configure a databse instance with a list of preferred disk failure group names to use when that instance accesses ASM disks. The format of the values of the asm_preferred_read_failure_groups parameter is diskgroupname.failuregroupname where diskgroupname is the name of the disk group that the failure group belongs to and failuregroupname is the preferred failure groups name. Include multiple diskgroup/failgroup names by separating each preferred read group defined with a comma as seen in this example:

asm_preferred_read_failure_groups=dgroup1.fdisk2, dgroup2.fdisk2

In the event ASM cannot read from the preferred disk failure group, then the non-preferred failure groups will be read. To determine if a given disk file group is a preferred disk group you can use the PREFERRED_READ column of the V$ASM_DISK view.

最新文章

  1. Effective C++ 笔记2(构造,析构,赋值)
  2. IO(三)----序列流
  3. MVC入门第一天
  4. Virtual Box 杂记
  5. 用js读写cookie的简单办法
  6. How to use SourceGear DiffMerge in SourceSafe, TFS, and SVN【项目】
  7. 从零开始学ios开发(十):Multiview Applications(多个xib之前的切换)
  8. iOS- iPad UIPopoverController
  9. Linux时间子系统之(十四):tick broadcast framework
  10. .net core 接口返回图片并且进行压缩
  11. NPOI 的使用姿势
  12. 【Python】*args和**kwargs的区别
  13. 浅谈一类无关序列有前缀和性质的统计问题的离线解法 BZOJ3626
  14. Django--ORM 多表查询
  15. zepto 入门
  16. jmeter分布式压力测试实践+登录为例
  17. Leaf - 一个由 Go 语言编写的开发效率和执行效率并重的开源游戏服务器框架
  18. easyUI datagrid 清空
  19. RN 中 Native 模块的注入过程
  20. 20155206 2016-2017-2 《Java程序设计》第三周学习总结

热门文章

  1. [android] android 获取网络连接信息
  2. Servlet开发-----基础及MVC设计模式
  3. jQuery补充,模拟图片放大镜
  4. gsoap 学习 1-自己定义接口生成头文件
  5. php -- PHP5中file_get_contents函数获取带BOM的utf-8文件内容
  6. bootstrap基础学习四篇
  7. uva 610(tarjan的应用)
  8. django 模型中的计算字段
  9. CSS继承元素属性
  10. Fragment,仿QQ空间