1 IOUG Presentation Capacity Planning with Enterprise Manager’s Metrics
Jun 17, 2015
1
IOUG PresentationCapacity Planning with Enterprise
Manager’s Metrics
2
Maaz Anjum • Marietta, Georgia • Solutions Architect • EM12c •Golden Gate • Engineered Systems
• Member of IOUG, GOUG, RMOUG RAC SIG, BIG DATA SIG EM SIG • Using Oracle products since 2001
Blog: maazanjum.com Email: [email protected] Twitter: @maaz_anjum
About Me
3
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
4
What is EM12c? !Did you know it… • Is Integrated with MOS • Can be used for Database and Middleware Provisioning • Can Monitor Engineered Systems – Exadata, Exalogic, Big Data Appliance
• Can be used for Compliance tracking • Has a Chargeback and Consolidation Planner feature • Can Manage the Cloud! • Is free to use!!
Overview
5
Systems
6
Engineered Systems
Exadata Exalogic
ODA
7
!• Overview • Background • Capacity Planning • Engineered Systems • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
8
The Question • The Clients executive management team had a decision at hand of
whether to expand their Exadata footprint going into a key business cycle.
!• In order to support their procurement decision they tasked the database
management team with identify current capacity and resource utilization within the Exadata environment.
!• Being new to Exadata and a former mainframe shop, they looked to BIAS
to help create reports and metrics from which to base this and future capacity planning decisions.
Background
9
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
10
Capacity Planning
CapacityPlanning
Current Utilization
DetermineSustainability
DevelopStrategy/Purchase
ImplementStrategy
EstimateFutureGrowth
11
Resource Utilization• Is there monitoring enabled for all resources? • Does the monitoring tool store the collected data? • Is the data accessible? • Can reports be run against the data?
12
• With so many metrics to chose from which ones were relevant? !!!!• Which target types? !!!• How should the data be represented?
Resource Utilization• CPU Utilization • Memory • Storage • IO
• Cluster • Host • Database
• BI Publisher is a free add-on to EM12c • Reports leverage EM12c Repository
• Excel • Good old excel!
13
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
14
Understand the “metrics”
Metrics
Data‘r
15
Data in Enterprise Manager !• EM12c Collects Metrics on intervals defined
within a targets monitoring setup. !• Data is collected via the Management Agents
and stored in an Oracle Database Repository !
• Collected Data can be access via the OMS Console !
• Metrics are collected as raw data points !
• Aggregated over hourly, and daily
Understand the “metrics”
16
Understand the “metrics”
em_metric_values_daily
EM Repository • em_metric_value
em_metric_values_hourly
17
• Metric Tables – em_metric_values – em_metric_values_daily – em_metric_values_hourly
• Metric Views – mgmt$metric_current – mgmt$metric_daily – mgmt$metric_hourly
• or – gc$metric_values – gc$metric_values_daily – gc$metric_values_hourly
Understand the “metrics”
New in EM12c
18
• Default retention for Repository Metric Tables – As per “12c Cloud Control Repository: How to Modify the Default
Retention and Purging Policies for Metric Data? (Doc ID 1405036.1)”
Understand the “metrics”
19
Understand the “metrics”ADF Business Components for Java Agent Application Deployment Automatic Storage Management Beacon CSA Collector Cluster Cluster ASM Cluster Database Clustered Application Deployment Database Instance Database System EM Servers System EM Service EMC CLARiiON System Email Driver Forms Generic Service Group Host Identity Management Internet Directory Listener Metadata Repository OC4J OMS Console OMS Platform OMS and Repository Oracle Access Management Cluster Oracle Access Management Server
Oracle Application Server Oracle Database Exadata Storage Server System Oracle Database Machine Oracle Engineered System Cisco Switch Oracle Engineered System Healthchecks Oracle Engineered System ILOM Server Oracle Engineered System PDU Oracle Exadata Storage Server Oracle Exadata Storage Server Grid Oracle Fusion Middleware Farm Oracle HTTP Server Oracle High Availability Service Oracle Home Oracle Infiniband Network Oracle Infiniband Switch Oracle Internet Directory Oracle Management Service Oracle Reports Server Oracle SOA Infra Cluster Oracle Service Bus Oracle WebLogic Cluster Oracle WebLogic Domain Oracle WebLogic Server SOA Composite SOA Infrastructure SOA Partition Single Sign-On Single Sign-On Server User Messaging Service Web Cache
• Data is collected per Target Type
20
Where are the “metrics”• For “any” target, navigate to its home page • Open the “Target Type” drop down • Go to Monitoring • Then “All Metrics”
21
Where are the “metrics”
22
Where are the “metrics”
23
Where are the “metrics”
Metric Column
Metric Groups
“Target” Type
24
Where are the “metrics”
CPU Time (sec)
Oracle Database
Tablespaces
DB file sequential read (%)Wait Time (sec)
Average Active SessionsFull Index Scans (per second)Open Cursors (per second)
SizeFree
Wait Bottlenecks
Throughput
25
Where are the “metrics”Exadata Metrics• Aggregated Exadata CellDisk Metric • Aggregated Exadata Capacity Metric • Aggregated Exadata Diskgroup Capacity Metric • Aggregated Exadata FlashDisk and HardDisk Metric • Cell Generated Alert • Exadata Cell Metric • Exadata CellDisk Metric • CellSrv Status Metric • Exadata Capacity Metric • Cell Configuration • Cell Configuration Patches • CELL CellDisk Configuration • CELL Flash Cache Cell Disks Configuration • CELL Flash Cache Configuration • CELL Grid Disk Clients Configuration • CELL Grid Disk Configuration • IORM Category Plan • CELL IORM Configuration • Exadata Inter-database Plan • CELL LUN Configuration • CELL LUN Physical Disks Configuration
• Exadata Performance Metrics • CELL Physical Disk Configuration • CELL Physical Disk Luns Configuration • Exadata Flash Cache Metric • HCA Configuration • HCA Port Connections and Configuration • HCA Port Configuration Monitor • HCA_PortConnConfigHelper • HCA_PortConnections • HCA Port Errors • HCA Port State • HCA Port State (For Alerts) • Host Interconnect Statistics • Exadata IORM Consumer Group Metric • Exadata IORM DB Metric • IORM Plan Status Metric • Exadata CellDisk Load Imbalance • Response • Top CPU
26
• Two ways to categorize • By “System or Cluster” !!!!!!!• By “Line of Business”
Categorize the “metrics”
Host Host Host
Cluster
Categorize the “metrics”
Exadata A
Cluster B
Exadata C
Cluster D
Cluster Host
Server 1
Server 2
Server 3
Server 4
Server 1
Server 2
Server 3
Server 4Server 1
Server 2
Server 3
Server 4
Server 1
Server 2
Server 3
Server 4
27
28
Categorize the “metrics”
Finance
Marketing
Sales
Procurement
Server 1
Server 2
Server 3
Server 4
EBS
Pre-Sales Pro
SalesForce
ProcuPro
MarketMax
LOB Department Application Host Database Instance
DB A: Inst 1
DB A: Inst 2
DB B: Inst 1
DB B: Inst 2
DB C: Inst 1
DB D: Inst 1
Accounts Payable
Account Receivable
Sales
Procurement
Marketing
29
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
30
• After lengthy discussions with The Client’s Architects, four metrics identified in two categories • Host • CPU Utilization % • Memory Utilization • Storage Usage !
• Database • Database CPU Time • To measure the CPU Utilization at a database level for each line of
business. !• This presentation will focus on CPU Utilization and Storage only.
The right “metrics”
31
• We used gc$metric_values in the sysman schema • Columns of interest • Target Type • Metric Group Label • Metric Name • Description
• Has to be enabled for every target
• Requires Lifecycle Management Pack access.
• It is used for Chargeback!
The right “metrics”
32
• Great. I know where the data is, but what does it look like? • Quite raw!
col entity_type format a15 heading "Target Type" col entity_name format a25 heading "Target Name" col metric_group_label format a7 heading "Metric|Group|Label" col metric_column_name format a7 heading "Metric|Column|Name" col value format 99.99 heading "Value" !select a.entity_type ,a.entity_name ,a.metric_group_label ,a.metric_column_name ,a.collection_time ,a.value from sysman.gc$metric_values a where entity_type = 'host' and a.metric_column_name = 'cpuUtil' and a.entity_name like 'shade%' order by collection_time; ! Metric Metric Group Column Target Type Target Name Label Name COLLECTION_TIME Value -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐ host blue.color.com Load cpuUtil 10-‐FEB-‐14 12.00.08 AM 7.93 host purple.color.com Load cpuUtil 10-‐FEB-‐14 12.02.26 AM 4.53 host red.color.com Load cpuUtil 10-‐FEB-‐14 12.03.58 AM 4.72 host green.color.com Load cpuUtil 10-‐FEB-‐14 12.04.08 AM 12.03 host blue.color.com Load cpuUtil 10-‐FEB-‐14 12.05.08 AM 20.81 host purple.color.com Load cpuUtil 10-‐FEB-‐14 12.07.26 AM 11.75 host red.color.com Load cpuUtil 10-‐FEB-‐14 12.08.58 AM 10.65 host green.color.com Load cpuUtil 10-‐FEB-‐14 12.09.08 AM 18.24 host blue.color.com Load cpuUtil 10-‐FEB-‐14 12.10.08 AM 20.76 host purple.color.com Load cpuUtil 10-‐FEB-‐14 12.12.26 AM 9.87 host red.color.com Load cpuUtil 10-‐FEB-‐14 12.13.58 AM 7.77 host green.color.com Load cpuUtil 10-‐FEB-‐14 12.14.08 AM 11.99 host blue.color.com Load cpuUtil 10-‐FEB-‐14 12.15.08 AM 14.35 host purple.color.com Load cpuUtil 10-‐FEB-‐14 12.17.26 AM 8.47 host red.color.com Load cpuUtil 10-‐FEB-‐14 12.18.58 AM 19.19 host green.color.com Load cpuUtil 10-‐FEB-‐14 12.19.08 AM 29.20 host blue.color.com Load cpuUtil 10-‐FEB-‐14 12.20.08 AM 43.13 host purple.color.com Load cpuUtil 10-‐FEB-‐14 12.22.26 AM 51.01
The right “metrics”
33
• Molding the data – Create a Base View from the metrics above mentioned
above – Create Categorical views on top of the base view to
further refine the data – Categorical Views leverage PIVOT and WITH clause
Time Slice Per Target
Time Slice Per
Business Unit
Base Viewper Metric
The right “metrics”
34
• Base Views • As mentioned in the table above, the metric_column_name value is the
key. • Depending on the metric, simply change the value, and apply the
transformation • Would contain data for a specific target type, for example host, database
instance etc • Is a de-normalized data set
The right “metrics”
35
The right “metrics”col entity_type format a4 heading "Entity|Type" col host_name format a20 heading "Host|Name" col database_machine format a4 heading "DB|Machine" col metric_column_label format a19 heading "Metric|Column|Label" col metric_column_name format a8 heading "Metric|Column|Name" col metric_group_label format a6 heading "Metric|Group|Label" col year_quarter format a8 heading "Year|Quarter" col year_month format a8 heading "Year|Month" col year_month_day format a22 heading "Year|Month|Day" col avg_value format 990.00 heading "Per|Month|Max|CPU|Util%" col max_value format 990.00 heading "Per|Month|Avg|CPU|Util%" !-‐-‐create or replace view v_cpuutil_base as with base as ( select entity_type ,substr(entity_name, 1, 4) as database_machine ,entity_name AS host_name ,metric_column_label ,metric_column_name ,metric_group_label ,collection_time ,to_char(collection_time,'yyyy') || '-‐Q' || to_char(collection_time,'q') as year_quarter ,extract(year from collection_time) ||'-‐' || ltrim(to_char(extract(month from collection_time),'09')) as year_month ,collection_time as year_month_day ,round(avg_value,2) as avg_value ,max_value from sysman.gc$metric_values_hourly where entity_type = 'host' and metric_column_name = 'cpuUtil' and metric_group_label = ‘Load') select * from base where database_machine = 'shade';
entity_type = 'host' and metric_column_name in ('usedLogicalMemoryPct','logicMemfreePct') and metric_group_label = ‘Load';
• Base Views
36
Metric Metric Metric Avg Max Enti DB Host Column Column Group Year Year Month CPU CPU Type Mach Name Label Name Label COLLECTION_TIME Quarter Month Day Util% Util% -‐-‐-‐-‐ -‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 12.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 12.00.00 AM 0.34 1.08 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 01.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 01.00.00 AM 0.26 0.27 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 02.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 02.00.00 AM 0.26 0.32 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 03.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 03.00.00 AM 0.26 0.30 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 04.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 04.00.00 AM 0.26 0.27 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 05.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 05.00.00 AM 0.32 0.60 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 06.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 06.00.00 AM 0.28 0.34 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 07.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 07.00.00 AM 0.27 0.34 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 08.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 08.00.00 AM 0.33 0.66 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 09.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 09.00.00 AM 0.37 0.65 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 10.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 10.00.00 AM 0.28 0.31 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 11.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 11.00.00 AM 0.29 0.36 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 12.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 12.00.00 PM 0.30 0.39 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 01.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 01.00.00 PM 0.30 0.65 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 02.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 02.00.00 PM 0.36 0.57 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 03.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 03.00.00 PM 0.37 0.56 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 04.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 04.00.00 PM 0.30 0.37 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 05.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 05.00.00 PM 0.39 1.56 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 06.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 06.00.00 PM 0.27 0.30 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 07.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 07.00.00 PM 0.27 0.29 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 08.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 08.00.00 PM 0.28 0.34 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 09.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 09.00.00 PM 0.28 0.31 host shade blue.color.com CPU Utilization (%) cpuUtil Load 29-‐MAR-‐13 10.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 10.00.00 PM 0.27 0.28
The right “metrics”
37
The right “metrics”
Metric Metric Metric Year Max Avg Enti DB Host Column Column Group Year Year Month Free Mem Free Mem Type Mach Name Label Name Label COLLECTION_TIME Quarter Month Day Util% Util% -‐-‐-‐-‐ -‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 12.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 12.00.00 AM 12.88 14.00 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 01.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 01.00.00 AM 13.03 13.65 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 02.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 02.00.00 AM 13.63 14.01 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 03.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 03.00.00 AM 13.14 13.99 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 04.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 04.00.00 AM 13.43 13.66 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 05.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 05.00.00 AM 13.54 13.65 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 06.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 06.00.00 AM 13.40 13.66 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 07.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 07.00.00 AM 13.83 13.92 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 08.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 08.00.00 AM 13.80 13.91 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 09.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 09.00.00 AM 13.37 13.67 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 10.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 10.00.00 AM 11.86 13.03 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 11.00.00 AM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 11.00.00 AM 12.92 13.21 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 12.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 12.00.00 PM 13.00 13.57 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 01.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 01.00.00 PM 13.40 13.66 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 02.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 02.00.00 PM 13.28 13.70 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 03.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 03.00.00 PM 7.73 13.64 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 04.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 04.00.00 PM 7.77 8.01 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 05.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 05.00.00 PM 7.99 8.09 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 06.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 06.00.00 PM 7.86 8.18 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 07.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 07.00.00 PM 8.06 8.21 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 08.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 08.00.00 PM 10.22 13.32 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 09.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 09.00.00 PM 9.28 14.15 host shade blue.color.com Logical Free Memory (%) logicMemfreePct Load 29-‐MAR-‐13 10.00.00 PM 2013-‐Q1 2013-‐03 29-‐MAR-‐13 10.00.00 PM 13.39 13.81
38
The right “metrics”• Cluster Views
• Built using the “base” view, for example v_cpuutil_base • Use analytical functions for maximum, average, and 95th percentile
col cluster_name format a4 heading "DB|Machine" col metric_column_label format a24 heading "Metric|Column|Label" col metric_column_name format a15 heading "Metric|Column|Name" col metric_group_label format a6 heading "Metric|Group|Label" col year_quarter format a8 heading "Year|Quarter" col per_q_dbm_max_cpuutil_pct format 990.00 heading "Max Per Quarter|CPU|Util%" col per_q_dbm_avg_cpuutil_pct format 990.00 heading "Avg Per Quarter|CPU|Util%" col per_q_dbm_max_95th_pct format 990.00 heading "95th Per Quarter|CPU|Util%” !-‐-‐create or replace view v_cpuutil_cluster_per_quarter select distinct cluster_name ,metric_column_label ,metric_group_label ,year_quarter ,round(max(max_value) over (partition by cluster_name, year_quarter), 2) as per_q_dbm_max_cpuutil_pct ,round(percentile_cont(0.05) within group (order by max_value desc) over (partition by cluster_name, year_quarter), 2) as per_q_dbm_max_95th_pct ,round(avg(avg_value) over (partition by cluster_name, year_quarter), 2) as per_q_dbm_avg_cpuutil_pct from v_cpuutil_base where cluster_name = 'shade' order by year_quarter;
Change these selected columns for quarter, month, day etc for cluster vs hosts views
39
The right “metrics” Metric Metric Max Per Quarter 95th Per Quarter Avg Per Quarter DB Column Group Year CPU CPU CPU Mach Label Label Quarter Util% Util% Util% -‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ shade CPU Utilization (%) Load 2013-‐Q1 95.32 90.05 24.17 shade CPU Utilization (%) Load 2013-‐Q2 99.89 84.24 22.42 shade CPU Utilization (%) Load 2013-‐Q3 99.83 96.89 32.45 shade CPU Utilization (%) Load 2013-‐Q4 99.83 87.13 31.27 shade CPU Utilization (%) Load 2014-‐Q1 99.04 81.48 30.54
• Cluster/Database Machine CPU Utilization Per Quarter
• Cluster/Database Machine CPU Utilization Per Month Metric Metric Max Per Quarter 95th Per Quarter Avg Per Quarter DB Column Group Year CPU CPU CPU Mach Label Label Month Util% Util% Util% -‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ shade CPU Utilization (%) Load 2013-‐03 95.32 90.05 24.17 shade CPU Utilization (%) Load 2013-‐04 99.89 85.97 19.33 shade CPU Utilization (%) Load 2013-‐05 99.02 80.99 22.39 shade CPU Utilization (%) Load 2013-‐06 99.65 84.51 25.53 shade CPU Utilization (%) Load 2013-‐07 99.83 98.07 32.84 shade CPU Utilization (%) Load 2013-‐08 99.82 97.25 31.95 shade CPU Utilization (%) Load 2013-‐09 99.67 87.84 32.57 shade CPU Utilization (%) Load 2013-‐10 99.83 91.13 35.64 shade CPU Utilization (%) Load 2013-‐11 96.15 85.08 29.54 shade CPU Utilization (%) Load 2013-‐12 94.68 74.73 28.38 shade CPU Utilization (%) Load 2014-‐01 94.46 79.88 28.31 shade CPU Utilization (%) Load 2014-‐02 99.04 83.22 31.94 shade CPU Utilization (%) Load 2014-‐03 97.66 80.45 32.89
40
• But what about the Portfolio/Line of Business Views !• Remember this from earlier? !!• We created customized mapping between the Database/
Database Services and their portfolio structure. • For example, Finance -> Accounts Payable -> AP_APP
(Host/Database) -> RAC_SVC_AP_APP (RAC Service). • Why do I mention Database and Database Service • Database; To map storage to an Application • Database Service; To map db cpu time to an
Application. How does an application connect to the database?
The right “metrics”
41
• But what about the Portfolio/Line of BusinessCREATE TABLE portfolio { line_of_business NOT NULL VARCHAR2(4000) ,department NOT NULL VARCHAR2(256) ,application NOT NULL VARCHAR2(256) ,host_name NOT NULL VARHCAR2(256) ,database_name NOT NULL VARCHAR2(256) ,service_name NOT NULL VARCHAR2(256) }; SQL> SELECT * FROM portfolio; line_of_business department application host_name database_name service_name -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ Supply Chain Transformation Pricing blue.color.com RACDB03 RACDB03_PRC_01 Supply Chain Transformation Consolidation blue.color.com RACDB03 RACDB03_CSL_01 Supply Chain Transformation Transformation blue.color.com RACDB03 RACDB03_TSF_01 Merchandising Handling Breakage green.color.com RACDB05 RACDB05_BKG_01 Merchandising Handling Returns green.color.com RACDB05 RACDB05_RTN_01 IT Order Management Inventory purple.color.com RACDB07 RACDB07_INV_01 IT Order Management Supply purple.color.com RACDB07 RACDB07_SUP_01
The right “metrics”
• Alternatively, leverage Groups in EM12c
42
• But what about the Portfolio/Line of Businesswith base as ( select a.entity_type ,b.line_of_business ,b.department ,b.application ,a.substr(entity_name, 1, 4) as database_machine ,a.entity_name AS host_name ,a.metric_column_label ,a.metric_column_name ,a.metric_group_label ,a.collection_time ,to_char(a.collection_time,'yyyy') || '-‐Q' || to_char(a.collection_time,'q') as year_quarter ,extract(year from a.collection_time) ||'-‐' || ltrim(to_char(extract(month from a.collection_time),'09')) as year_month ,a.collection_time as year_month_day ,round(a.avg_value,2) as avg_value ,a.max_value from sysman.gc$metric_values_hourly a ,portfolio b where a.host_name = b.host_name and a.entity_type = 'host' and a.metric_column_name = 'cpuUtil' and a.metric_group_label = ‘Load') select * from base where line_of_business = 'shade';
The right “metrics”
43
Enough words…
Visualize the “metrics”
Show me the
graphs!
44
CPU Utilization (%) • The most profound and relative metric for a host is its CPU Utilization. • According to Oracle Documentation – “this metric represents the amount of CPU utilization as a percentage of
total CPU processing power available” • Aggregation for hosts in a Cluster is easy to represent • When CPU Utilization (%) data is aggregated over several months it can
appear skewed. • Utilize 95th Percentile to show sustained peak values
Visualize the “metrics”
45
0"
10"
20"
30"
40"
50"
60"
70"
80"
90"
100"
2012,01"
2012,09"
2012,10"
2012,11"
2012,12"
2012,13"
2012,14"
2012,15"
2012,16"
2012,17"
2012,18"
2012,19"
2012,20"
2012,21"
2012,22"
2012,23"
2012,24"
2012,25"
2012,26"
2012,27"
2012,28"
2012,29"
2012,30"
2012,31"
2012,32"
2012,33"
2012,34"
2012,35"
2012,36"
2012,37"
2012,38"
2012,39"
2012,40"
2012,41"
2012,42"
2012,43"
2012,44"
2012,45"
2012,46"
2012,47"
2012,48"
2012,49"
2012,50"
2012,51"
2012,52"
2013,01"
2013,04"
2013,05"
2013,06"
2013,07"
2013,08"
2013,09"
2013,10"
2013,11"
2013,12"
Exadata&B&Cluster&CPU&U0liza0on&
Max"
Avg"
max_95_percen:le"
Visualize the “metrics”
46
Storage Utilization • With storage, I’ve found that a common
question which always comes up is “How much have I allocated vs actually used?”
• Whether the utilization in question is within an ASM cluster or instance) – Disk Group – Database – Tablespace
• EM12c captures two basic metrics – Usable – Total
• This data can be extended to various groupings, by the mapping table mentioned previously
Visualize the “metrics”
47
0"
2000"
4000"
6000"
8000"
10000"
12000"
14000"
16000"
18000"
20000"
2(Oct(12"
9(Oct(12"
16(Oct(12"
23(Oct(12"
30(Oct(12"
6(Nov(12"
13(Nov(12"
20(Nov(12"
27(Nov(12"
4(Dec(12"
11(Dec(12"
18(Dec(12"
25(Dec(12"
1(Jan(13"
8(Jan(13"
15(Jan(13"
22(Jan(13"
29(Jan(13"
5(Feb(13"
12(Feb(13"
19(Feb(13"
26(Feb(13"
5(Mar(13"
12(Mar(13"
19(Mar(13"
ASM$Cluster$(Actual)$Storage$Alloca2on$
Usable"Used"(GB)"
Usable"Total"(GB)"
Visualize the “metrics”
48
Visualize the “metrics”
49
What about BI Publisher?
Visualize the “metrics”• A free add-‐on to Enterprise Manager 12c. • Under restricted-‐user license agreement, it is free to use with the Enterprise Manager repository only.
• Mini OBIEE!
50
What about BI Publisher?
Visualize the “metrics”• Two main components – Data Model – Report
51
Visualize the “metrics”
52
Visualize the “metrics”
53
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
54
• What did The Client Need VS What they asked for? – Important to recognize realistic goals – Set them for The Client! – Be like water, use the path of least resistance!
!• Whether or not additional hardware is required is always a good question !
• Be patient, the “metrics” will reveal their secrets in due time!
Lessons
55
!
• Overview • Background • Capacity Planning • Understanding EM Metrics • Using EM Metrics • Lessons • Conclusion
Agenda
56
• When put in the right perspective, these reports will • Highlight growth trends • Technical as well as • Business point of view
• Reports generate more questions than answers • What caused the spike in CPU Utilization, or Memory? • Were there more database on-boarded, or was there excessive load on the
existing ones? • What could attribute to the spikes in Storage growth?
• The idea behind building these reports is simple • Data (metrics) already available in EM12c • Why not use them?
Conclusion
57
Questions
58
References• Management Repository Views • http://docs.oracle.com/cd/E24628_01/doc.121/e25161/views.htm
• Enterprise Manager Host Metrics • http://docs.oracle.com/cd/E24628_01/em.121/e25162/
host.htm#BABIBAHD • Enterprise Manager Database Plug-in Metric Reference Manual • http://docs.oracle.com/cd/E24628_01/em.121/e25160/toc.htm
• Practical approach to Capacity Planning • http://www.techspot.co.in/2011/09/practical-approach-to-capacity-
planning.html !
59
Blog: maazanjum.com Email: [email protected] Twitter: @maaz_anjum
Reminder: Complete evaluation Session: #102
Title: Capacity Planning: How to Leverage OEM12c for Engineered Systems