SlideShare a Scribd company logo
Automatic Storage Management 
(ASM) Metrics are a Goldmine: 
Let’s Use Them! 
Bertrand Drouvot
About Me 
 Oracle DBA since 1999 
 OCP 9i,10g,11g 
 Rac certified Expert 
 Exadata certified implementation specialist 
 Blogger since 2012 
 @bertranddrouvot 
 BasketBall fan
Are you happy with? 
 asmcmd iostat? 
 asmiostat.sh from MOS [ID 437996.1])? 
 Me, I am not: The metrics provided are not 
enough, the way we can extract and display 
them is not customizable enough, and we 
don’t see the I/O repartitions within all the 
ASM or database instances into a RAC 
environment.
Welcome to asm_metrics 
1. It provides useful real-time metrics: 
 Reads/s: Number of read per second. 
 KbyRead/s: Kbytes read per second. 
 Avg ms/Read: ms per read in average. 
 AvgBy/Read: Average Bytes per read. 
 Writes/s: Number of write per second. 
 KbyWrite/s: Kbytes write per second. 
 Avg ms/Write: ms per write in average. 
 AvgBy/Write: Average Bytes per write. 
2. It is RAC aware: You can display the metrics for all the ASM and (or) 
database instances or just a subset. 
3. You can aggregate the results following your needs in a customizable way: 
Aggregate per ASM Instances, database instances, Diskgroup, Failgroup or 
a combination of all of them. 
4. It does not need any change to the source: Simply download it and use it.
How does it work? 
 The script takes a snapshot each second (default interval) 
from the gv$asm_disk_iostat cumulative view (or 
gv$asm_disk_stat) and computes the delta with the 
previous snapshot. 
 The only difference with gv$asm_disk_stat is the 
information available in memory while v$asm_disk access 
the disks to re-collect some information. 
 Since the information required doesn’t require to “re-collect” 
it from the disks (as a discovery of new disks is 
not needed), gv$asm_disk_stat is more appropriated here.
Let’s use it 
Important remark: 
The blank value for one of those fields (INST, DBINST, DG, FG, DSK) means that the values have 
been aggregated for this particular field.
How are the metrics computed? 
 The metrics are computed this way: 
 Reads/s comes from the delta computation of the READS column divided by the 
snapshot wait interval. 
 KbyRead/s comes from the delta computation of the BYTES_READ column divided by 
the snapshot wait interval. 
 Avg ms/Read comes from the delta computation of the READ_TIME / READS columns. 
 AvgBy/Read comes from the delta computation of the BYTES_READ / READS columns. 
 Writes/s comes from the delta computation of the WRITES column divided by the 
snapshot wait interval. 
 KbyWrite/s comes from the delta computation of the BYTES_WRITTEN column divided 
by the snapshot wait interval. 
 Avg ms/Write comes from the delta computation of the WRITE_TIME / WRITES 
columns. 
 AvgBy/Write comes from the delta computation of the BYTES_WRITTEN / WRITES 
columns.
What are the features? (1/3) 
 To explain the features, let’s have a look to 
the help
What are the features? (2/3) 
1. You can choose the number of snapshots to display and the time to wait between the 
snapshots. The purpose is to see a limited number of snapshots of a specified amount of 
wait time between snapshots. 
2. You can choose on which ASM instance to collect the metrics thanks to the - 
INST= parameter. Useful in RAC configuration to see the repartition of the ASM metrics 
per ASM instances. 
3. You can choose for which DB instance to collect the metrics thanks to the - 
DBINST= parameter (wildcard allowed). In case you need to focus on a particular 
database or a subset of them. 
4. You can choose on which Diskgroup to collect the metrics thanks to the -DG= parameter 
(wildcard allowed). In case you need to focus on a particular diskgroup or a subset of 
them. 
5. You can choose on which Failgroup to collect the metrics thanks to the -FG= parameter 
(wildcard allowed). In case you need to focus on a particular failgroup or a subset of 
them.
What are the features? (3/3) 
6. You can choose on which Exadata Cells to collect the metrics thanks to the - 
IP= parameter (wildcard allowed). In case you need to focus on a particular cell or a 
subset of them. 
7. You can aggregate the results on the ASM instances, DB instances, Diskgroup, Failgroup 
(or Exadata cells IP) level thanks to the -SHOW= parameter. Useful to get an overview of 
what is going on per ASM Instances, per diskgroup or whatever you want, as this is fully 
customizable. 
8. You can display the metrics per snapshot, the average metrics value since the collection 
began (that is to say since the script has been launched) or both thanks to the - 
DISPLAY= parameter. So that you can get the metrics per snapshots, since the script has 
been launched or both. 
9. You can sort based on the number of reads, number of writes or number of IOPS 
(reads+writes) thanks to the -SORT_FIELD= parameter (so that you could for example 
find out which database is the top responsible for the I/O). So that you can find the ASM 
instances, the database Instances, or the diskgroup, or the failgroup or whatever you 
want that is generating most of the I/O reads, most of the I/O writes or most of the IOPS 
(reads+writes).
Find out the most physical IO consumers through 
ASM in real time. This is useful as you don’t need to 
connect to any database instance to get this info as 
this is "centralized" into the ASM instances. 
Let's sort first based on the number of reads per 
second that way: 
./asm_metrics.pl -show=dbinst -sort_field=reads 
11 
Use case 1
I want to see the ASM preferred read in action for a particular diskgroup 
(BDT_PREF for example) and see the IO metrics for the associated 
failgroups. I want to see that no reads are done "outside" the preferred 
failgroup. 
Let’s configure the ASM preferred read parameters: 
SQL> alter system set asm_preferred_read_failure_groups='BDT_PREF.WIN' sid='+ASM1'; 
System altered. 
SQL> alter system set asm_preferred_read_failure_groups='BDT_PREF.JMO' sid='+ASM2'; 
System altered. 
And check its behaviour thanks to the utility: 
./asm_metrics.pl -show=dg,inst,fg -dg=BDT_PREF 
12 
Use case 2
I want to see the IO distribution on Exadata across the Cells 
(storage nodes). For example I want to check that the IO 
load is well balanced across all the cells. This is feasible 
thanks to the show=ip option: 
./asm_metrics.pl -show=dbinst,dg,ip -dg=BDT 
13 
Use case 3
I want to see the IO distribution recorded into the ASM instances: 
./asm_metrics.pl -show=inst 
I want to see the IO distribution recorded into the ASM instances for each 
database instance: 
./asm_metrics.pl -show=inst,dbinst 
I want to see the IO distribution recorded into the ASM instances for the 
database instances linked to the BDT database: 
./asm_metrics.pl -show=inst,dbinst -dbinst=%BDT% 
14 
Use case 4, 5 & 6
I want to see the IO distribution over the FAILGROUPS: 
./asm_metrics.pl -show=fg 
I want to see the IO distribution and their associated metrics across the 
ASM instances and the failgroups: 
./asm_metrics.pl -show=fg,inst 
I want to see the IO distribution across the ASM instances, diskgroups and 
failgroups: 
./asm_metrics.pl -show=fg,inst,dg 
15 
Use case 7,8 & 9
The use cases focused only on snapshots taken during the last second 
but you could also: 
Takes snapshots of longer period of time thanks to the 
interval parameter: 
./asm_metrics.pl -interval=10 (for snaps of 10 seconds) 
View the average since the collection began (not only the 
snaps delta) thanks to the display parameter that way: 
./asm_metrics.pl -show=dbinst -sort_field=iops -display=avg 
16 
Remark
For this I created the csv_asm_metrics utility to produce a csv file from the output 
of the asm_metrics utility. 
Once you get the csv file you can graph the metrics with your favourite 
visualization tool (I’ll use Tableau as an example). 
First you have to launch the asm_metrics utility that way (To ensure that all the 
fields are displayed): 
-show=inst,dbinst,fg,dg,dsk for ASM >= 11g 
-show=inst,fg,dg,dsk for ASM < 11g 
and redirect the output to a text file: 
./asm_metrics.pl -show=inst,dbinst,fg,dg,dsk > asm_metrics.txt 
17 
Graphing ASM metrics
Produce the csv file 
./csv_asm_metrics.pl -if=asm_metrics.txt -of=asm_metrics.csv - 
d='2014/07/04' 
The csv file looks like: 
Snap Time,INST,DBINST,DG,FG,DSK,Reads/s,Kby Read/s,ms/Read,By/Read,Writes/s,Kby Write/s,ms/Write,By/Write 
2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST31,HOST31CA0D1C,0,0,0.0,0,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST31,HOST31CA0D1D,0,0,0.0,0,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST32,HOST32CA0D1C,0,0,0.0,0,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST32,HOST32CA0D1D,2,32,0.2,16384,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,FRA,HOST31,HOST31CC8D0F,0,0,0.0,0,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,FRA,HOST32,HOST32CC8D0F,0,0,0.0,0,0,0,0.0,0 
2014/07/04 13:48:54,+ASM1,BDT10_1,REDO1,HOST31,HOST31CC0D13,0,0,0.0,0,0,0,0.0,0 
As you can see: 
1.The day has been added (to create a date) and next ones will be calculated (should the snaps 18
19 
Visualize top IO consumers
20 
By ASM instances
21 
Read IO distribution by Failgroup
22 
Should I use the ASM preferred read?
Without (Read IOPS and Throughput) 
23 
Simulate the ASM preferred read (1/3)
Create calculated field 
24 
Simulate the ASM preferred read (2/3)
With simulated FG 
25 
Simulate the ASM preferred read (3/3)
 Thanks to these use cases, I hope you can see how 
customizable the utility is and how you could take 
benefit of it in a day-to-day work with ASM. 
 The main entry for the tool is located to this blog 
page: 
http://bdrouvot.wordpress.com/asm_metrics_scri 
pt/ from which you’ll be able to download the 
script or copy the source code. 
 Feel free to download it and to provide any 
feedback. 
26 
Conclusion
Questions?

More Related Content

What's hot

Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ram
Chris Adkin
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
Kyle Hailey
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
praveen_01236
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
Amazon Web Services
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets big
Selena Deckelmann
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
Emanuel Calvo
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
Guatemala User Group
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Tanel Poder
 
Sql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesSql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architectures
Chris Adkin
 
Cassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
Cassandra EU 2012 - Storage Internals by Nicolas Favre-FelixCassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
Cassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
Acunu
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
Jignesh Shah
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
Altinity Ltd
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
Yury Velikanov
 
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow EngineScaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Chris Adkin
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
PoguttuezhiniVP
 
Mysql database basic user guide
Mysql database basic user guideMysql database basic user guide
Mysql database basic user guide
PoguttuezhiniVP
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
elliando dias
 

What's hot (18)

Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ram
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
SQL Server vs Postgres
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets big
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
Sql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesSql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architectures
 
Cassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
Cassandra EU 2012 - Storage Internals by Nicolas Favre-FelixCassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
Cassandra EU 2012 - Storage Internals by Nicolas Favre-Felix
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
 
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow EngineScaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
Mysql database basic user guide
Mysql database basic user guideMysql database basic user guide
Mysql database basic user guide
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 

Similar to Automatic Storage Management (ASM) metrics are a goldmine: Let's use them!

10g rac asm
10g rac asm10g rac asm
10g rac asm
Victor
 
Hyperion Essbase integration with ODI
Hyperion Essbase integration with ODIHyperion Essbase integration with ODI
Hyperion Essbase integration with ODI
Dharmaraj Borse
 
Mongodb in-anger-boston-rb-2011
Mongodb in-anger-boston-rb-2011Mongodb in-anger-boston-rb-2011
Mongodb in-anger-boston-rb-2011
bostonrb
 
Improving Effeciency with Options in SAS
Improving Effeciency with Options in SASImproving Effeciency with Options in SAS
Improving Effeciency with Options in SAS
guest2160992
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
sivacse09
 
Amazon EMR Masterclass
Amazon EMR MasterclassAmazon EMR Masterclass
Amazon EMR Masterclass
Ian Massingham
 
Amazon EMR Masterclass
Amazon EMR MasterclassAmazon EMR Masterclass
Amazon EMR Masterclass
Amazon Web Services
 
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax
 
Elasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveElasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep dive
Sematext Group, Inc.
 
A presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NASA presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NAS
Rahul Janghel
 
MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013
EEvolutionUK
 
Optimization in essbase
Optimization in essbaseOptimization in essbase
Optimization in essbase
Ajay singh chouhan
 
Get Value from Your Data
Get Value from Your DataGet Value from Your Data
Get Value from Your Data
Danilo Poccia
 
Building Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scaleBuilding Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scale
Alex Thompson
 
oracle dba
oracle dbaoracle dba
oracle dba
uday jampani
 
3.5. managing cluster parameters
3.5. managing cluster parameters3.5. managing cluster parameters
3.5. managing cluster parameters
tsuras
 
Nyc summit intro_to_cassandra
Nyc summit intro_to_cassandraNyc summit intro_to_cassandra
Nyc summit intro_to_cassandra
zznate
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network Processing
Ryousei Takano
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
Jugal Shah
 
Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performance
brettallison
 

Similar to Automatic Storage Management (ASM) metrics are a goldmine: Let's use them! (20)

10g rac asm
10g rac asm10g rac asm
10g rac asm
 
Hyperion Essbase integration with ODI
Hyperion Essbase integration with ODIHyperion Essbase integration with ODI
Hyperion Essbase integration with ODI
 
Mongodb in-anger-boston-rb-2011
Mongodb in-anger-boston-rb-2011Mongodb in-anger-boston-rb-2011
Mongodb in-anger-boston-rb-2011
 
Improving Effeciency with Options in SAS
Improving Effeciency with Options in SASImproving Effeciency with Options in SAS
Improving Effeciency with Options in SAS
 
2713897 oracle-unix-oracle
2713897 oracle-unix-oracle2713897 oracle-unix-oracle
2713897 oracle-unix-oracle
 
Amazon EMR Masterclass
Amazon EMR MasterclassAmazon EMR Masterclass
Amazon EMR Masterclass
 
Amazon EMR Masterclass
Amazon EMR MasterclassAmazon EMR Masterclass
Amazon EMR Masterclass
 
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
 
Elasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveElasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep dive
 
A presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NASA presentaion on Panasas HPC NAS
A presentaion on Panasas HPC NAS
 
MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013
 
Optimization in essbase
Optimization in essbaseOptimization in essbase
Optimization in essbase
 
Get Value from Your Data
Get Value from Your DataGet Value from Your Data
Get Value from Your Data
 
Building Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scaleBuilding Apache Cassandra clusters for massive scale
Building Apache Cassandra clusters for massive scale
 
oracle dba
oracle dbaoracle dba
oracle dba
 
3.5. managing cluster parameters
3.5. managing cluster parameters3.5. managing cluster parameters
3.5. managing cluster parameters
 
Nyc summit intro_to_cassandra
Nyc summit intro_to_cassandraNyc summit intro_to_cassandra
Nyc summit intro_to_cassandra
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network Processing
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performance
 

Recently uploaded

Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 

Recently uploaded (20)

Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 

Automatic Storage Management (ASM) metrics are a goldmine: Let's use them!

  • 1. Automatic Storage Management (ASM) Metrics are a Goldmine: Let’s Use Them! Bertrand Drouvot
  • 2. About Me  Oracle DBA since 1999  OCP 9i,10g,11g  Rac certified Expert  Exadata certified implementation specialist  Blogger since 2012  @bertranddrouvot  BasketBall fan
  • 3. Are you happy with?  asmcmd iostat?  asmiostat.sh from MOS [ID 437996.1])?  Me, I am not: The metrics provided are not enough, the way we can extract and display them is not customizable enough, and we don’t see the I/O repartitions within all the ASM or database instances into a RAC environment.
  • 4. Welcome to asm_metrics 1. It provides useful real-time metrics:  Reads/s: Number of read per second.  KbyRead/s: Kbytes read per second.  Avg ms/Read: ms per read in average.  AvgBy/Read: Average Bytes per read.  Writes/s: Number of write per second.  KbyWrite/s: Kbytes write per second.  Avg ms/Write: ms per write in average.  AvgBy/Write: Average Bytes per write. 2. It is RAC aware: You can display the metrics for all the ASM and (or) database instances or just a subset. 3. You can aggregate the results following your needs in a customizable way: Aggregate per ASM Instances, database instances, Diskgroup, Failgroup or a combination of all of them. 4. It does not need any change to the source: Simply download it and use it.
  • 5. How does it work?  The script takes a snapshot each second (default interval) from the gv$asm_disk_iostat cumulative view (or gv$asm_disk_stat) and computes the delta with the previous snapshot.  The only difference with gv$asm_disk_stat is the information available in memory while v$asm_disk access the disks to re-collect some information.  Since the information required doesn’t require to “re-collect” it from the disks (as a discovery of new disks is not needed), gv$asm_disk_stat is more appropriated here.
  • 6. Let’s use it Important remark: The blank value for one of those fields (INST, DBINST, DG, FG, DSK) means that the values have been aggregated for this particular field.
  • 7. How are the metrics computed?  The metrics are computed this way:  Reads/s comes from the delta computation of the READS column divided by the snapshot wait interval.  KbyRead/s comes from the delta computation of the BYTES_READ column divided by the snapshot wait interval.  Avg ms/Read comes from the delta computation of the READ_TIME / READS columns.  AvgBy/Read comes from the delta computation of the BYTES_READ / READS columns.  Writes/s comes from the delta computation of the WRITES column divided by the snapshot wait interval.  KbyWrite/s comes from the delta computation of the BYTES_WRITTEN column divided by the snapshot wait interval.  Avg ms/Write comes from the delta computation of the WRITE_TIME / WRITES columns.  AvgBy/Write comes from the delta computation of the BYTES_WRITTEN / WRITES columns.
  • 8. What are the features? (1/3)  To explain the features, let’s have a look to the help
  • 9. What are the features? (2/3) 1. You can choose the number of snapshots to display and the time to wait between the snapshots. The purpose is to see a limited number of snapshots of a specified amount of wait time between snapshots. 2. You can choose on which ASM instance to collect the metrics thanks to the - INST= parameter. Useful in RAC configuration to see the repartition of the ASM metrics per ASM instances. 3. You can choose for which DB instance to collect the metrics thanks to the - DBINST= parameter (wildcard allowed). In case you need to focus on a particular database or a subset of them. 4. You can choose on which Diskgroup to collect the metrics thanks to the -DG= parameter (wildcard allowed). In case you need to focus on a particular diskgroup or a subset of them. 5. You can choose on which Failgroup to collect the metrics thanks to the -FG= parameter (wildcard allowed). In case you need to focus on a particular failgroup or a subset of them.
  • 10. What are the features? (3/3) 6. You can choose on which Exadata Cells to collect the metrics thanks to the - IP= parameter (wildcard allowed). In case you need to focus on a particular cell or a subset of them. 7. You can aggregate the results on the ASM instances, DB instances, Diskgroup, Failgroup (or Exadata cells IP) level thanks to the -SHOW= parameter. Useful to get an overview of what is going on per ASM Instances, per diskgroup or whatever you want, as this is fully customizable. 8. You can display the metrics per snapshot, the average metrics value since the collection began (that is to say since the script has been launched) or both thanks to the - DISPLAY= parameter. So that you can get the metrics per snapshots, since the script has been launched or both. 9. You can sort based on the number of reads, number of writes or number of IOPS (reads+writes) thanks to the -SORT_FIELD= parameter (so that you could for example find out which database is the top responsible for the I/O). So that you can find the ASM instances, the database Instances, or the diskgroup, or the failgroup or whatever you want that is generating most of the I/O reads, most of the I/O writes or most of the IOPS (reads+writes).
  • 11. Find out the most physical IO consumers through ASM in real time. This is useful as you don’t need to connect to any database instance to get this info as this is "centralized" into the ASM instances. Let's sort first based on the number of reads per second that way: ./asm_metrics.pl -show=dbinst -sort_field=reads 11 Use case 1
  • 12. I want to see the ASM preferred read in action for a particular diskgroup (BDT_PREF for example) and see the IO metrics for the associated failgroups. I want to see that no reads are done "outside" the preferred failgroup. Let’s configure the ASM preferred read parameters: SQL> alter system set asm_preferred_read_failure_groups='BDT_PREF.WIN' sid='+ASM1'; System altered. SQL> alter system set asm_preferred_read_failure_groups='BDT_PREF.JMO' sid='+ASM2'; System altered. And check its behaviour thanks to the utility: ./asm_metrics.pl -show=dg,inst,fg -dg=BDT_PREF 12 Use case 2
  • 13. I want to see the IO distribution on Exadata across the Cells (storage nodes). For example I want to check that the IO load is well balanced across all the cells. This is feasible thanks to the show=ip option: ./asm_metrics.pl -show=dbinst,dg,ip -dg=BDT 13 Use case 3
  • 14. I want to see the IO distribution recorded into the ASM instances: ./asm_metrics.pl -show=inst I want to see the IO distribution recorded into the ASM instances for each database instance: ./asm_metrics.pl -show=inst,dbinst I want to see the IO distribution recorded into the ASM instances for the database instances linked to the BDT database: ./asm_metrics.pl -show=inst,dbinst -dbinst=%BDT% 14 Use case 4, 5 & 6
  • 15. I want to see the IO distribution over the FAILGROUPS: ./asm_metrics.pl -show=fg I want to see the IO distribution and their associated metrics across the ASM instances and the failgroups: ./asm_metrics.pl -show=fg,inst I want to see the IO distribution across the ASM instances, diskgroups and failgroups: ./asm_metrics.pl -show=fg,inst,dg 15 Use case 7,8 & 9
  • 16. The use cases focused only on snapshots taken during the last second but you could also: Takes snapshots of longer period of time thanks to the interval parameter: ./asm_metrics.pl -interval=10 (for snaps of 10 seconds) View the average since the collection began (not only the snaps delta) thanks to the display parameter that way: ./asm_metrics.pl -show=dbinst -sort_field=iops -display=avg 16 Remark
  • 17. For this I created the csv_asm_metrics utility to produce a csv file from the output of the asm_metrics utility. Once you get the csv file you can graph the metrics with your favourite visualization tool (I’ll use Tableau as an example). First you have to launch the asm_metrics utility that way (To ensure that all the fields are displayed): -show=inst,dbinst,fg,dg,dsk for ASM >= 11g -show=inst,fg,dg,dsk for ASM < 11g and redirect the output to a text file: ./asm_metrics.pl -show=inst,dbinst,fg,dg,dsk > asm_metrics.txt 17 Graphing ASM metrics
  • 18. Produce the csv file ./csv_asm_metrics.pl -if=asm_metrics.txt -of=asm_metrics.csv - d='2014/07/04' The csv file looks like: Snap Time,INST,DBINST,DG,FG,DSK,Reads/s,Kby Read/s,ms/Read,By/Read,Writes/s,Kby Write/s,ms/Write,By/Write 2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST31,HOST31CA0D1C,0,0,0.0,0,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST31,HOST31CA0D1D,0,0,0.0,0,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST32,HOST32CA0D1C,0,0,0.0,0,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,DATA,HOST32,HOST32CA0D1D,2,32,0.2,16384,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,FRA,HOST31,HOST31CC8D0F,0,0,0.0,0,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,FRA,HOST32,HOST32CC8D0F,0,0,0.0,0,0,0,0.0,0 2014/07/04 13:48:54,+ASM1,BDT10_1,REDO1,HOST31,HOST31CC0D13,0,0,0.0,0,0,0,0.0,0 As you can see: 1.The day has been added (to create a date) and next ones will be calculated (should the snaps 18
  • 19. 19 Visualize top IO consumers
  • 20. 20 By ASM instances
  • 21. 21 Read IO distribution by Failgroup
  • 22. 22 Should I use the ASM preferred read?
  • 23. Without (Read IOPS and Throughput) 23 Simulate the ASM preferred read (1/3)
  • 24. Create calculated field 24 Simulate the ASM preferred read (2/3)
  • 25. With simulated FG 25 Simulate the ASM preferred read (3/3)
  • 26.  Thanks to these use cases, I hope you can see how customizable the utility is and how you could take benefit of it in a day-to-day work with ASM.  The main entry for the tool is located to this blog page: http://bdrouvot.wordpress.com/asm_metrics_scri pt/ from which you’ll be able to download the script or copy the source code.  Feel free to download it and to provide any feedback. 26 Conclusion