O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Presentation implementing oracle asm successfully

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 63 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Presentation implementing oracle asm successfully (20)

Anúncio

Mais de xKinAnx (20)

Mais recentes (20)

Anúncio

Presentation implementing oracle asm successfully

  1. 1. HOWTO: Implementing Oracle ASM Successfully Alex Gorbachev 23 September, 2010 San Francisco, CA
  2. 2. © 2009/2010 Pythian Alex Gorbachev • CTO, The Pythian Group • Blogger • OakTable Network member • Oracle ACE Director • BattleAgainstAnyGuess.com • President, Oracle RAC SIG 2
  3. 3. © 2009/2010 Pythian Why Companies Trust Pythian • Recognized Leader: • Global industry-leader in remote database administration services and consulting for Oracle, Oracle Applications, MySQL and SQL Server • Work with over 150 multinational companies such as Forbes.com, Fox Interactive media, and MDS Inc. to help manage their complex IT deployments • Expertise: • One of the world’s largest concentrations of dedicated, full-time DBA expertise. • Global Reach & Scalability: • 24/7/365 global remote support for DBA and consulting, systems administration, special projects or emergency response 3
  4. 4. © 2009/2010 Pythian Pre-ASM Oracle Storage 4
  5. 5. © 2009/2010 Pythian Pre-ASM Oracle Storage • Too complex • 3rd party vendors • Additional licensing cost • Many groups involved • Storage engineers • SA’s • DBA’s • Loosing layout visibility 4
  6. 6. © 2009/2010 Pythian Pre-ASM Oracle Storage • Too complex • 3rd party vendors • Additional licensing cost • Many groups involved • Storage engineers • SA’s • DBA’s • Loosing layout visibility • Too simple • Doesn’t scale • Not reliable • Not flexible 4
  7. 7. © 2009/2010 Pythian Why ASM? • Simplify • Fewer vendors involved • Fewer layers • Move many operations under DBA umbrella • oh well, Storage Administrator role • Cost efficient • No need to license volume manager • Cheap storage boxes are good for ASM • Manageable 5
  8. 8. © 2009/2010 Pythian ASM Basic Principles • Organizing Oracle files on physical disks • “Purpose-built file system” • Mirroring • reliability & failure tolerance • Striping • performance & scalability • Rebalancing • manageability 6
  9. 9. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  10. 10. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  11. 11. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  12. 12. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  13. 13. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  14. 14. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping 7
  15. 15. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping file1 7
  16. 16. © 2009/2010 Pythian ASM Striping • Extents and Allocation Units • Coarse striping & Fine striping • Random striping -> equal distribution • You cannot disable ASM striping file1 file2 7
  17. 17. © 2009/2010 Pythian What’s the Best Hardware Striping for ASM? 8
  18. 18. © 2009/2010 Pythian What’s the Best Hardware Striping for ASM? 8 Hardware striping RAID
  19. 19. © 2009/2010 Pythian What’s the Best Hardware Striping for ASM? • Allocate disk spindles or partitions to ASM • 1 physical disk = 1 LUN = 1 ASM disk • Can mirror disks in RAID-1 • 2 x RAID-1 physical disks = 1 LUN • If you really have to use RAID... • Watch for striping conflicts • stripe width 640K & AU size 1MB = bad • Align AU with striping • 1 AU = stripe size • 1 AU = stripe width • Avoid RAID-5 8 Hardware striping RAID
  20. 20. © 2009/2010 Pythian What’s the Best Hardware Striping for ASM? • Allocate disk spindles or partitions to ASM • 1 physical disk = 1 LUN = 1 ASM disk • Can mirror disks in RAID-1 • 2 x RAID-1 physical disks = 1 LUN • If you really have to use RAID... • Watch for striping conflicts • stripe width 640K & AU size 1MB = bad • Align AU with striping • 1 AU = stripe size • 1 AU = stripe width • Avoid RAID-5 8 Hardware striping RAID
  21. 21. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  22. 22. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  23. 23. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  24. 24. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  25. 25. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  26. 26. © 2009/2010 Pythian ASM Rebalancing • asm_power_limit - rebalancing speed • Async rebalancing in 11.2.0.2 • No auto-magic re-layout based on performance • You can force rebalancing for a DG • Intelligent Data Placement - Hot / Cold 9
  27. 27. © 2009/2010 Pythian What’s the Best LUN Size for ASM? • All disks in the same DG should be sized equally • All disks in the same DG should perform the same • LUN size is the increment of adding space • Don’t make too big - harder to manage • Bug for 2+ TB disks • Size within 500GB-1TB is usually OK • Don’t make disks too small & too many disks • Don’t make DG more than few TB in 10g 10
  28. 28. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  29. 29. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  30. 30. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  31. 31. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  32. 32. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  33. 33. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  34. 34. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  35. 35. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  36. 36. © 2009/2010 Pythian ASM Mirroring • Primary extent & mirror extent • Write is done to all extent copies • Read is done always from primary extent by default • Silent corruptions? • Use ASMCMD “remap” command • Intelligent Data Placement for secondary extents 11
  37. 37. © 2009/2010 Pythian • Group of disks can fail at once • Mirror extents between failure groups • Beware of space provisioning • Beware of disk partnering (double disk failures) SAN 1 SAN 2 ASM Failure Groups 12
  38. 38. © 2009/2010 Pythian • Group of disks can fail at once • Mirror extents between failure groups • Beware of space provisioning • Beware of disk partnering (double disk failures) SAN 1 ASM Failure Groups 12
  39. 39. © 2009/2010 Pythian • Group of disks can fail at once • Mirror extents between failure groups • Beware of space provisioning • Beware of disk partnering (double disk failures) SAN 1 ASM Failure Groups 12
  40. 40. © 2009/2010 Pythian ASM 10g issues • ASM upgrade requires full RAC outage • Fixed 1MB allocation unit • Overhead with multi-TB databases • Recovery from failure is inefficient • ASM Mirroring is not VLDB ready • Extended clusters read IO is inefficient • Limited FS functionality and tools 13
  41. 41. © 2009/2010 Pythian ASM 11gR1 - variable extent size • 10g • 1 extent = 1 AU • 11g • 1-20,000 extents 1 extent = 1 AU • 20,001 - 40,000 1 extent = 8 AU’s • 40,001 - ... 1 extent = 64 AU’s • 1 TB = 1+ mil. extents • 1MB AU: • 1 TB = 53,572 extents • 64MB AU: • 1 TB = 16,384 extents • 100 TB = 66,788 extents 14
  42. 42. © 2009/2010 Pythian ASM 11gR1 - recovery from failures • Fast Mirror Resync • OFFLINE disks • disk_repair_time attribute • ASM extent change tracking • Suitable for transient failures and maintenance • Fast Rebalancing in restricted mount • Normal rebalancing => many lock/unlock extent map • Restrict mode rebalancing => no locks • Restrict mounted DG => service outage
  43. 43. © 2009/2010 Pythian ASM 11gR1 - Preferred Mirror Read • For extended clusters • Storage mirrored across 2 or 3 datacenters • 10g • Read is first done on primary extent • 11g • Preferred read failure groups (to local disks) • asm_preferred_read_failure_groups in init.ora
  44. 44. © 2009/2010 Pythian ASM Instance • Special kind of Oracle instance • Clustered in RAC • Manages metadata • ASM disks and diskgroups • ASM extent map • Performs rebalancing • Must be started before database instance 17
  45. 45. © 2009/2010 Pythian ASM Software Stack 18
  46. 46. © 2009/2010 Pythian ASM Software Stack 18 Operating System
  47. 47. © 2009/2010 Pythian ASM Software Stack 18 Operating System Multipathing
  48. 48. © 2009/2010 Pythian ASM Software Stack 18 Operating System Multipathing Grid Infrastructure
  49. 49. © 2009/2010 Pythian ASM Software Stack 18 Operating System Multipathing Grid Infrastructure ASM
  50. 50. © 2009/2010 Pythian ASM Software Stack 18 Operating System Multipathing Grid Infrastructure ASM Database
  51. 51. © 2009/2010 Pythian ASM Software Stack 18 Operating System Multipathing Grid Infrastructure ASM Database ASMKernelModules (ACFS)
  52. 52. © 2009/2010 Pythian19 ASMLib?
  53. 53. © 2009/2010 Pythian19 ASMLib? ASMLib
  54. 54. © 2009/2010 Pythian19 ASMLib? • Role of ASMLib • supposedly simplified discovery • covered by UDEV / dev mapper / MP • reduced number of open descriptors • Originally designed as API for storage vendors • ASMLib on Linux - reference implementation • ASMLib is useless in vast majority of deployments ASMLib
  55. 55. © 2009/2010 Pythian ASM Layers 20 Diagram from Oracle whitepaper
  56. 56. © 2009/2010 Pythian ASM Overhead? • ASM is not in the IO code path for Oracle Database • ASM only operates extent maps and disk headers • Database -> thousands IO’s per second vs ASM -> few IO’s per minute • Additional ASM instance - memory and processes but not much • Database instance keeps ASM extent maps in SGA • Mirroring generates additional write IO • ADVM - another layer • ACFS - yet another layer 21
  57. 57. © 2009/2010 Pythian ASM Licensing • Prior to 11.2.0.2 - ASM is “free” • All ACFS features are part of “Oracle Cluster File System - Cloud Edition” as of 11.2.0.2 • Restricted use license for Oracle database files included with all database editions (SE/SE1/EE) • I.e. all ASM features for the database are still free • External-tables, DataPump exp/imp dumps, flat files for SQL Loader ?????? • Pricing is still not published 22
  58. 58. © 2009/2010 Pythian How Many Diskgroups Do You Need? • It depends... • Use SAME (Stripe And Mirror Everything) • Start with 2 - DATA + FRA for all databases • Make conscious decision to split into more diskgroups • need to be very convincing • redo logs are often a candidate • tiered storage is an option • per database split (cold failover, database moves) 23
  59. 59. © 2009/2010 Pythian DATA and FRA on the Shared Physical Disks? • YES if following SAME principles (maximize perf/util) • DATA on the outer tracks of disk and FRA on the inner tracks • Exadata is a typical example • NO if following resiliency & stability principles • Performance degradation • Exadata has IORM that prioritizes backup IO lower • Disk failure makes both database and backup corrupted 24
  60. 60. © 2009/2010 Pythian ASM Implementation Checklist • Plan space and performance capacity (IOPS & MB/s) • AWR or Statspack • Write IO vs read IO • Redo, tempfiles, datafiles, etc • Create provisioning standards (DG naming, disk sizing) • Performance of each LUN and total (ORION is great) • Use OMF -- “We have standards” doesn’t cut it! • Don’t screw up multipathing • Very very careful with thin provisioning • Master RMAN • Use latest possible version 25
  61. 61. © 2009/2010 Pythian ASM Implementation Checklist • Plan space and performance capacity (IOPS & MB/s) • AWR or Statspack • Write IO vs read IO • Redo, tempfiles, datafiles, etc • Create provisioning standards (DG naming, disk sizing) • Performance of each LUN and total (ORION is great) • Use OMF -- “We have standards” doesn’t cut it! • Don’t screw up multipathing • Very very careful with thin provisioning • Master RMAN • Use latest possible version 25
  62. 62. © 2009/2010 Pythian Operational Support Checklist • Watch space usage • Watch performance of each LUN • Watch failed disks • Monitor ASM instance alert.log • Use REMAP regularly to check secondary extents • Consider a separate role for ASM management • Break the silos - bring ASM management to DBA team • Avoid rebalancing in critical hours • Every DBA and storage admin should practice failure handling 26
  63. 63. © 2009/2010 Pythian What’s next? • Book draw • Leave me your cards or email+phone Q & A Email me - gorbachev@pythian.com Read my blog - http://www.pythian.com Follow me on Twitter - @AlexGorbachev Join Pythian fan club on Facebook & LinkedIn 27

×