ASM Configuration Review Luca Canali, CERN-IT Distributed Database Operations Workshop CERN, November 26 th, 2009.

Slides:



Advertisements
Similar presentations
ASM 11g R1/R2 Enhancements Suresh Gandhi
Advertisements

Scalable Storage Configuration for the Physics Database Services Luca Canali, CERN IT LCG Database Deployment and Persistency Workshop October, 2005.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM.
Automatic Storage Management The New Best Practice Steve Adams Ixora Rich Long Oracle Corporation Session id:
Allocation Methods - Contiguous
CERN IT Department CH-1211 Genève 23 Switzerland t Storage for Data Management and Physics Databases Luca Canali, IT-DM After-C5 Presentation.
MIS 431 Chapter 61 Chapter 6 – Managing Disk and Data Storage MIS 431 Created Spring 2006.
© 2009 IBM Corporation Statements of IBM future plans and directions are provided for information purposes only. Plans and direction are subject to change.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Session 3 Windows Platform Dina Alkhoudari. Learning Objectives Understanding Server Storage Technologies Direct Attached Storage DAS Network-Attached.
Data Storage Willis Kim 14 May Types of storages Direct Attached Storage – storage hardware that connects to a single server Direct Attached Storage.
Virtual Network Servers. What is a Server? 1. A software application that provides a specific one or more services to other computers  Example: Apache.
1 RAL Status and Plans Carmine Cioffi Database Administrator and Developer 3D Workshop, CERN, November 2009.
BNL Oracle database services status and future plans Carlos Fernando Gamboa RACF Facility Brookhaven National Laboratory, US Distributed Database Operations.
Simplify your Job – Automatic Storage Management Angelo Session id:
© 2009 Oracle Corporation. S : Slash Storage Costs with Oracle Automatic Storage Management Ara Vagharshakian ASM Product Manager – Oracle Product.
Re-defining Database Storage Management
LAN / WAN Business Proposal. What is a LAN or WAN? A LAN is a Local Area Network it usually connects all computers in one building or several building.
Database Services for Physics at CERN with Oracle 10g RAC HEPiX - April 4th 2006, Rome Luca Canali, CERN.
CERN IT Department CH-1211 Geneva 23 Switzerland t Experience with NetApp at CERN IT/DB Giacomo Tenaglia on behalf of Eric Grancher Ruben.
Luca Canali, CERN Dawid Wojcik, CERN
Chapter 18: Windows Server 2008 R2 and Active Directory Backup and Maintenance BAI617.
Module 9: Configuring Storage
Chapter 8 Implementing Disaster Recovery and High Availability Hands-On Virtual Computing.
ACFS Under Scrutiny Luca Canali, CERN Dawid Wojcik, CERN UKOUG Conference, Birmingham, Nov 2010.
CERN - IT Department CH-1211 Genève 23 Switzerland t Tier0 database extensions and multi-core/64 bit studies Maria Girone, CERN IT-PSS LCG.
Chapter 1 Managing Storage. Contents Understanding Partitioning Understanding LVM Understanding RAID Understanding Clustering and GFS Using Access Control.
DB Installation and Care Carmine Cioffi Database Administrator and Developer ICAT Developer Workshop, The Cosener's House August
CERN - IT Department CH-1211 Genève 23 Switzerland t Oracle Real Application Clusters (RAC) Techniques for implementing & running robust.
VMware vSphere Configuration and Management v6
Forschungszentrum Karlsruhe in der Helmholtz-Gemeinschaft Implementation of a reliable and expandable on-line storage for compute clusters Jos van Wezel.
CERN IT Department CH-1211 Genève 23 Switzerland t Possible Service Upgrade Jacek Wojcieszuk, CERN/IT-DM Distributed Database Operations.
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
CERN Database Services for the LHC Computing Grid Maria Girone, CERN.
Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g.
CERN IT Department CH-1211 Genève 23 Switzerland t DBA Experience in a multiple RAC environment DM Technical Meeting, Feb 2008 Miguel Anjo.
Infrastructure for Data Warehouses. Basics Of Data Access Data Store Machine Memory Buffer Memory Cache Data Store Buffer Bus Structure.
CERN - IT Department CH-1211 Genève 23 Switzerland t High Availability Databases based on Oracle 10g RAC on Linux WLCG Tier2 Tutorials, CERN,
CERN IT Department CH-1211 Genève 23 Switzerland t Storage Overview and IT-DM Lessons Learned Luca Canali, IT-DM DM Group Meeting
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
CS 540 Database Management Systems
Maria Girone CERN - IT Tier0 plans and security and backup policy proposals Maria Girone, CERN IT-PSS.
Scalable Oracle 10g for the Physics Database Services Luca Canali, CERN IT January, 2006.
Database CNAF Barbara Martelli Rome, April 4 st 2006.
PIC port d’informació científica Luis Diaz (PIC) ‏ Databases services at PIC: review and plans.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
3 Copyright © 2006, Oracle. All rights reserved. Installation and Administration Basics.
2 Copyright © 2006, Oracle. All rights reserved. RAC and Shared Storage.
DB Questions and Answers open session (comments during session) WLCG Collaboration Workshop, CERN Geneva, 24 of April 2008.
CERN IT Department CH-1211 Genève 23 Switzerland t Using Data Guard for hardware migration UKOUG RAC & HA SIG, Feb 2008 Miguel Anjo, CERN.
System Storage TM © 2007 IBM Corporation IBM System Storage™ DS3000 Series Jüri Joonsaar Tartu.
Oracle Database High Availability
Storage Overview and IT-DM Lessons Learned
NGS Oracle Service.
Oracle Database High Availability
Scalable Database Services for Physics: Oracle 10g RAC on Linux
Introduction of Week 6 Assignment Discussion
Oracle Storage Performance Studies
Case studies – Atlas and PVSS Oracle archiver
ASM-based storage to scale out the Database Services for Physics
Oracle Solutions for Data Archiving
Implementing ASM Without HW RAID, A User’s Experience
Scalable Database Services for Physics: Oracle 10g RAC on Linux
ASM File Group Parity Protection New to ASM for Oracle Database 19c
ASM Database Clones New to ASM for Oracle Database 18c
Chapter 14: File-System Implementation
Presentation transcript:

ASM Configuration Review Luca Canali, CERN-IT Distributed Database Operations Workshop CERN, November 26 th, 2009

Outline  ASM motivations and CERN’s architecture  ASM technology review  ASM configuration parameters, instance management  Configuration of storage arrays for ASM  RAID and ASM  Oracle clusterware and ASM  Normal redundancy or external redundancy? 2ASM Configuration Review, Luca Canali

Architecture and main concepts Why ASM ? –Provides functionality of volume manager and a cluster file system –Raw access to storage for performance Why ASM-provided mirroring? –Allows to use lower-cost storage arrays –Allows to mirror across storage arrays arrays are not single points of failure 3ASM Configuration Review, Luca Canali

CERN Set-up  Dual-CPU quad-core 2950 DELL servers, 16GB memory, Intel 5400-series “Harpertown”; 2.33GHz clock  Dual power supplies, mirrored local disks, 4 NIC (2 private/ 2 public), dual HBAs, “RAID 1+0 like” with ASM 4ASM Configuration Review, Luca Canali

Oracle Cluster Storage, ASM ASM for mirroring and striping across arrays and striping Allows the use of commodity HW (mirror across arrays) Disks can be added and removed online for scheduled and unscheduled changes Example: disk groups: data and flash recovery Mirroring Striping DATADG RECODG 5

ASM Configuration Review, Luca Canali ASM Storage Internals  ASM Disks are divided in Allocation Units (AU)  Default size 1 MB (_asm_ausize)  Tunable diskgroup attribute in 11g  ASM files are built as a series of extents  Extents are mapped to AUs using a file extent map  When using ‘normal redundancy’, 2 mirrored extents are allocated, each on a different failgroup  RDBMS read operations access only the primary extent of a mirrored couple (unless there is an IO error)  In 10g the ASM extent size = AU size 6

ASM Configuration Review, Luca Canali ASM Files, Extents, and Failure Groups Files and extent pointers Failgroups and ASM mirroring 7

ASM Configuration Review, Luca Canali ASM Is Not a Black Box  ASM is implemented as an Oracle instance  Familiar operations for the DBA  Configured with SQL commands  Info in V$ views  Logs in udump and bdump  Some ‘secret’ details hidden in X$TABLES and ‘underscore’ parameters 8

ASM Configuration Review, Luca Canali Selected V$ Views and X$ Tables View NameX$ TableDescription V$ASM_DISKGROUPX$KFGRPperforms disk discovery and lists diskgroups V$ASM_DISKX$KFDSK, X$KFKIDperforms disk discovery, lists disks and their usage metrics V$ASM_FILEX$KFFILlists ASM files, including metadata V$ASM_ALIASX$KFALSlists ASM aliases, files and directories V$ASM_TEMPLATEX$KFTMTAASM templates and their properties V$ASM_CLIENTX$KFNCLlists DB instances connected to ASM V$ASM_OPERATIONX$KFGMGlists current rebalancing operations N.A.X$KFKLIBavailable libraries, includes asmlib N.A.X$KFDPARTNERlists disk-to-partner relationships N.A.X$KFFXPextent map table for all ASM files N.A.X$KFDATallocation table for all ASM disks

ASM PDB-Utilities  lsdg  Shows diskgroup details  lsop  Shows rebalacing operations  listdisks.py  Shows available disks in ASM, space, status, etc  New: utility to scan disks to find secondary extent corruption  Developed in-house, available to share ASM Configuration Review, Luca Canali

ASM Parameters  Notable ASM instance parameters: *.asm_diskgroups='TEST1_DATADG1','TEST1_RECODG1' *.asm_diskstring='/dev/mpath/itstor*p*' *.asm_power_limit=5 *.shared_pool_size=90M *.db_cache_size=80M *.large_pool_size=20M *.sga_max_size=200M *.instance_type='asm' *.processes=100 11

ASM Configuration Review, Luca Canali ASM takes care of mirroring  ASM with normal redundancy diskgroups  Provide for striping and mirroring  It’s similar to RAID10, but there is no disk-to-disk mirroring  Oracle can take care directly of the disk access No stripe on stripe, only 1 stripe size (1MB wide on 10gR2 by default) 12

ASM Configuration Review, Luca Canali ASM Rebalancing  Rebalancing is performed (and mandatory) after space management operations  Goal: balanced space allocation across disks  Not based on performance or utilization  ASM spreads every file across all disks in a diskgroup  ASM instances are in charge of rebalancing  Extent pointers changes are communicated to the RDBMS RDBMS’ ASMB process keeps an open connection to ASM This can be observed by running strace against ASMB  In RAC, extra messages are passed between the cluster ASM instances LMD0 of the ASM instances are very active during rebalance 13

ASM Configuration Review, Luca Canali Rebalancing, an Example Data: D.Wojcik, CERN IT 14

ASM Configuration Review, Luca Canali Rebalancing Workload  When ASM mirroring is used (e.g. with normal redundancy)  Rebalancing operations can move more data than expected  Example:  5 TB (allocated): ~100 disks, 200 GB each  A disk is replaced (diskgroup rebalance) The total IO workload is 1.6 TB (8x the disk size!) How to see this: query v$asm_operation, the column EST_WORK keeps growing during rebalance  The issue: excessive repartnering 15

ASM Configuration Review, Luca Canali ASM Disk Partners  ASM diskgroup with normal redundancy  Two copies of each extents are written to different ‘failgroups’  Two ASM disks are partners:  When they have at least one extent set in common (they are the 2 sides of a mirror for some data)  Each ASM disk has a limited number of partners  Typically 10 disk partners: X$KFDPARTNER  Helps to reduce the risk associated with 2 simultaneous disk failures 16

ASM Configuration Review, Luca Canali Fast Mirror Resync  ASM 10g with normal redundancy does not allow to offline part of the storage  A transient error in a storage array can cause several hours of rebalancing to drop and add disks  It is a limiting factor for scheduled maintenances  11g has new feature ‘fast mirror resync’ Redundant storage can be put offline for maintenance Changes are accumulated in the staleness registry (file#12) Changes are applied when the storage is back online 17

Setup of the Array  Should I use normal redundancy or RAID (or both)?  Let’s review some use cases:  CERN: high performance and high availability clusters.  RAC and ASM.  Many physical disks for IOPS performance  Many TB of storage  Low cost  ~10 disk arrays per DB cluster  ASM diskgroups with normal redundancy Disks configured as JBOD, ASM does mirroring and striping ASM Configuration Review, Luca Canali18

Small Config with ASM and CRS redundancy  Data diskgroup created over 3 storage arrays  Each array is an ASM failgroup  Disks configured as JBOD  Three copies of cluster voting disk distributed over 3 arrays ASM Configuration Review, Luca Canali19 ASM

Notes on a config with 3 arrays  Data in a ASM diskgroup with normal redundancy and 3 arrays  is simply mirrored (i.e. 2 copies of extents are maintained)  Note small difference of ASM mirroring vs. RAID1: Ex: stripe of 1 MB on diskarray 1, mirror copy somewhere on disk array 2 or 3 ASM Configuration Review, Luca Canali20

..with 2 arrays  With 2 arrays it is also possible to profit from ASM mirroring across arrays.  Although in case of failure redundancy cannot be restored  Rebalance will only be possible when HW is restored ASM Configuration Review, Luca Canali21 ASM

Notes on a config with 2 arrays  Clusterware voting disk need be deployed in a odd number of copies  Typically 3  A limitation of the algorithm used by Oracle  Therefore for a 2-array config one array failure can bring down the cluster There is the possibility of a work-around, but not too elegant.. ASM Configuration Review, Luca Canali22

..with 1 array  When using only 1 array, probably better use RAID6  RAID 10 also a viable possibility  ASM diskgroup with external redundancy  May be good for test/non critical DBs  or simply low budget/lower maintenance effort ASM Configuration Review, Luca Canali23 ASM RAID6

Notes on a config with 1 array  Often total disk capacity is quite high  Sizing should take in consideration number of disks for IOPS  Create 1 or 2 volumes with RAID6  then create LUNs of 2TB  ASM 10g does not want LUNs > 2TB  No need to use all the available space Leave spare LUNs to be added to ASM in the future is needed ASM Configuration Review, Luca Canali24

ASM over RAID  ASM ‘external redundancy’ over RAID volumes Makes sense for the 1-array config described Makes sense for HA configs when ‘enterprise storage’ is used Does not protect against controller failure  ASM ‘normal redundancy’ over RAID volumes Provides protection for more than 1 simultaneous failure That is more failures can happen while redundancy is being restored Reduced performance: in particular writes suffer  ASM with high redundancy Protects against 2 simultaneous HW failures, no experience there ASM Configuration Review, Luca Canali25

Data Protection, Redundancy and More  From architecture point of view How much protection to build with redundancy Where do one start with backup protection Where to put the line for disaster recovery protection?  Example from CERN (see Jacek’s presentation): ASM normal redundancy Flash copy of the DB Backup to tape Dataguard protection ASM Configuration Review, Luca Canali26

ASM and Flash Copy  Flash copy of DB stored in the recovery diskgroup  Recovery diskgroup created on: The internal part of the disk (slower part) While data is in the data diskgroup on faster part of the disk  Recovery diskgroup with 2 failgroups One of the 2 failgroups on dedicated storage for critical DBs  This is also a way to make use of extra storage when using large disks Note: storage sizing is often on IOPS, that is number of spindles ASM Configuration Review, Luca Canali27

When tape is not available  Create 2 (or more) filesystems on RAID6 volume On dedicated storage array Mount ext3 filesystem locally on one node –ASM diskgroup considered too risky as this is a backup solution RMAN backups to filesystem –Parallelized on multiple channels, one per filesystem ASM Configuration Review, Luca Canali28 ASM RAID6 ext3

Notes on installation  Prerequisites:  Create volumes and export LUNs  Setup FC zoning  Partition disks OS level  Set permissions for oracle user at os level  Device mapper setup for multipathing  HBA driver parameters, for example ql2xmaxqdepth  Raw devices for CRS and ASM spfile  Sharing info: ASM Configuration Review, Luca Canali29

Storage Sanity Check  Test performance and stress test for robusteness  ORION is the easiest Basic IO metrics measured by ORION IOPS for random I/O (8KB) MBPS for sequential I/O (in chunks of 1 MB) Latency associated with the IO operations Simple to use Get started:./orion_linux_em64t -run simple -testname mytest -num_disks 2 More info: ASM Configuration Review, Luca Canali30

Testing Storage Performance for Oracle DBs – L.Canali, D.Wojcik ORION output, an example

Testing Storage Performance for Oracle DBs – L.Canali, D.Wojcik ORION results, small random read IOPS Disks UsedArrayIOPSIOPS / DISK Mirrored Capacity 128x SATAInfortrend 16-bay TB 120x Raptor 2.5’’ Infortrend 12-bay TB 144xWD ‘Green disks’ Infortrend 12-bay TB 22 TB 96x Raptor 3.5’’cmsonline Infortrend 16-bay TB 80x SAS Pics Netapps RAID-DP TB

Actual ASM Installation  The easiest part when all of the above is done!  Preferred method for 10g  Same ORACLE_HOME for RDBMS and ASM  Oracle home installation with cloning  Example of diskgroup creation on partition 1 (external part) with 6 disk arrays: create diskgroup test2_datadg1 normal redundancy failgroup itstor625 disk '/dev/mpath/itstor625_*p1' failgroup itstor626 disk '/dev/mpath/itstor626_*p1' failgroup itstor627 disk '/dev/mpath/itstor627_*p1' failgroup itstor628 disk '/dev/mpath/itstor628_*p1' failgroup itstor629 disk '/dev/mpath/itstor629_*p1' failgroup itstor630 disk ‘/dev/mpath/itstor630_*p1‘; ASM Configuration Review, Luca Canali33

Conclusions  Storage setup most important for HA and performance  ASM and SAN storage for CERN and Tier1  Considerable experience cumulated over time  Sharing experience  ASM can have different ‘good’ configs  depending on available HW and desired protection  Higher performance needs more DBA maintenance 34ASM Configuration Review, Luca Canali

Acknowledgments  Physics DB team, in particular discussions with Maria, Jacek and Dawid  Discussions with Carmine, Gordon and Jason 35ASM Configuration Review, Luca Canali