SlideShare a Scribd company logo
“Where	
  did	
  my	
  CPU	
  go?”	
  
monitoring	
  &	
  capacity	
  planning	
  
adventures	
  on	
  a	
  consolidated	
  
environment	
  
Presented	
  by:	
  	
  
Karl	
  Arao	
  
1
whoami	
  
Karl	
  Arao	
  
•  Senior	
  Technical	
  Consultant	
  @	
  Enkitec	
  
•  Performance	
  and	
  Capacity	
  Planning	
  Enthusiast	
  	
  
	
  
7	
  years	
  DBA	
  experience	
  
Oracle	
  ACE,	
  OCP-­‐DBA,	
  RHCE,	
  OakTable	
  
Blog:	
  karlarao.wordpress.com	
  
Wiki:	
  karlarao.Oddlyspot.com	
  
TwiPer:	
  @karlarao	
  
	
  
www.enkitec.com	
   2	
  
www.enkitec.com	
   3	
  
100+
3
Agenda	
  
•  HOWTO	
  compare	
  CPU	
  speeds	
  
	
  
•  Cores	
  vs	
  Threads	
  
•  The	
  different	
  CPU	
  events	
  
•  CPU	
  Monitoring/Capacity	
  Planning	
  on	
  consolidated	
  environments	
  
	
  
	
  
www.enkitec.com	
   4	
  
www.enkitec.com	
   5	
  
12:27:15 SYS@DEMO1> show parameter cpu_count!
!
NAME TYPE VALUE!
------------------------------------ ----------- --------!
cpu_count integer 16!
www.enkitec.com	
   6	
  
Socket0
Core0
CPU0 CPU8
Core1
CPU1 CPU9
Core2
CPU2 CPU10
Core3
CPU3 CPU11
Socket1
Core0
CPU4 CPU12
Core1
CPU5 CPU13
Core2
CPU6 CPU14
Core3
CPU7 CPU15
Exadata	
  V2	
  =>	
  2s8c16t	
  
PART1:	
  compare	
  CPU	
  speeds	
  
www.enkitec.com	
   7	
  
Different	
  methods:	
  
•  Published	
  benchmarks	
  
– TPC-­‐C	
  
– SPECint_rate2006	
  
•  Actual	
  Benchmarking	
  
– cputoolkit	
  
– SLOB	
  (lio	
  test)	
  
www.enkitec.com	
   8	
  
TPC-­‐C	
  
•  TransacOon	
  Processing	
  Performance	
  Council	
  (TPC)	
  
•  Throughput	
  =>	
  transacOons	
  per	
  minute	
  (tpmC)	
  
•  Price/Performance	
  =>	
  USD	
  /	
  tpmC	
  
www.enkitec.com	
   9	
  
•  CPU	
  performance	
  =>	
  tpmC	
  /	
  core	
  
•  1609186.39	
  /	
  16	
  =	
  100574	
  
SPECint_rate2006	
  
•  Standard	
  Performance	
  EvaluaOon	
  CorporaOon	
  (SPEC)	
  
•  SPECint_rate2006	
  	
  
•  Integer	
  performance	
  
•  All	
  CPUs	
  are	
  used	
  
•  Used	
  by	
  OEM12c	
  ConsolidaOon	
  Planner	
  (SYSMAN.EMCT_SPEC_RATE_LIB)	
  
•  CPU	
  performance	
  =>	
  SPECint_rate2006/core	
  
•  702/16	
  =	
  43.875	
  
www.enkitec.com	
   10	
  
$ cat spec.txt | grep -i sun | grep -i x3-2 | sort -rnk1!
44.0625, 16, 2, 8, 2, 632, 705, Oracle Corporation, Sun Blade X3-2B (Intel Xeon E5-2690 2.9GHz)!
44.0625, 16, 2, 8, 2, 630, 705, Oracle Corporation, Sun Server X3-2L (Intel Xeon E5-2690 2.9GHz)!
43.875, 16, 2, 8, 2, 628, 702, Oracle Corporation, Sun Server X3-2 (Intel Xeon E5-2690 2.9GHz)!
!
2007	
  vs	
  2012	
  
www.enkitec.com	
   11	
  
tpmC/core, System, tpmC, Price/Perf, Total System Cost, Currency, Database Software, Server CPU Type, Total Server Cores, Cluster, Date Submitted
Result/# Cores, # Cores, # Chips, # Cores Per Chip, # Threads Per Core, Baseline, Result, Hardware Vendor, System
Actual	
  Benchmarking	
  
•  cputoolkit	
  and	
  SLOB	
  (lio	
  test)	
  
•  LIOs/sec	
  
www.enkitec.com	
   12	
  
CPU1	
  
CPU2	
  
CPU3	
  
CPU4	
  
CPU5	
  
CPU6	
  
CPU7	
  
CPU8	
  
CPU1	
  
CPU2	
  
CPU3	
  
CPU4	
  
CPU5	
  
CPU6	
  
CPU7	
  
CPU8	
  
cputoolkit	
  
./runcputoolkit-­‐auto	
  <start	
  CPU>	
  <end	
  CPU>	
  <db	
  name>	
  
./runcputoolkit-­‐auto	
  1	
  2	
  dw	
  
SLOB	
  
./runit.sh	
  <writers>	
  <readers>	
  
while	
  :;	
  do	
  ./runit.sh	
  0	
  2;	
  done	
  
Both	
  at	
  25%	
  	
  
CPU	
  uElizaEon	
  
V2	
  and	
  X2	
  CPU	
  perf	
  comparison	
  
www.enkitec.com	
   13	
  
3.6M LIOs/sec
2.1M LIOs/sec
V2	
  -­‐>	
  X2	
  migraOon	
  
www.enkitec.com	
   14	
  
chip	
  efficiency	
  factor	
  	
  =	
  (source	
  LIOs/sec)	
  /	
  (desOnaOon	
  LIOs/sec)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  2.1M	
  /	
  3.6M	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  .5833	
  
	
  
X2	
  CPU	
  requirement	
  	
  	
  =	
  source	
  host	
  CPUs	
  *	
  uOlizaOon	
  *	
  chip	
  efficiency	
  factor	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  16	
  *	
  .46	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  7.36	
  	
  *	
  .5833	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  4.29	
  CPUs	
  
	
  
X2	
  CPU	
  UOlizaOon	
  	
  	
  	
  	
  	
  	
  =	
  CPU	
  requirement	
  /	
  CPU	
  capacity	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  4.29	
  /	
  24	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  =	
  17.8	
  %	
  
	
  
V2 X2
PART2:	
  Cores	
  vs	
  Threads	
  
www.enkitec.com	
   15	
  
Socket0
Core0 Core1 Core2 Core3
Socket0
Core0
CPU1 CPU5
Core1
CPU2 CPU6
Core2
CPU3 CPU7
Core3
CPU4 CPU8
www.enkitec.com	
   16	
  
~30%	
  depends	
  on	
  the	
  workload	
  
www.enkitec.com	
   17	
  
cputoolkit	
   SLOB	
  
17%	
   21%	
  
Intel HT Technology Technical User's Guide http://goo.gl/3Ec5Z
PART3:	
  Different	
  CPU	
  events	
  
CPU	
  
CPU	
  Wait	
  
CPU	
  Scheduler	
  
	
  
www.enkitec.com	
   18	
  
www.enkitec.com	
   19	
  
AAS	
  CPU	
  
www.enkitec.com	
   20	
  
CPU	
  Wait	
  
www.enkitec.com	
   21	
  
www.enkitec.com	
   22	
  
CPU	
  Scheduler	
  
www.enkitec.com	
   23	
  
www.enkitec.com	
   24	
  
www.enkitec.com	
   25	
  
Pupng	
  it	
  all	
  together	
  
Instances	
  Caged	
  
at	
  12	
  CPUs	
  
SQL	
  Applied	
  to	
  lock	
  
in	
  good	
  plan.	
  
Problem:	
  A	
  single	
  SQL	
  Stmt.	
  overwhelming	
  
CPU	
  resources.	
  
PART4:	
  CPU	
  monitoring	
  and	
  
Capacity	
  Planning	
  
	
  
www.enkitec.com	
   26	
  
OS	
  Tools	
  
•  The	
  usual	
  OperaOng	
  System	
  commands	
  
–  vmstat	
  
–  top	
  
–  mpstat	
  –P	
  ALL	
  1	
  5	
  
•  Cool	
  tools	
  	
  
–  collectl	
  –sC	
  	
  (hPp://collectl.sourceforge.net)	
  
–  turbostat.c	
  
–  dcli	
  (Exadata)	
  
•  dcli	
  -­‐l	
  oracle	
  -­‐g	
  /home/oracle/dbs_group	
  -­‐-­‐vmstat	
  2	
  
•  dcli	
  -­‐l	
  oracle	
  -­‐g	
  /home/oracle/dbs_group	
  upOme	
  
www.enkitec.com	
   27	
  
www.enkitec.com	
   28	
  
Load	
  Map	
  
www.enkitec.com	
   29	
  
Performance	
  Page	
  –	
  Historical	
  View	
  
AWR	
  Toolkit	
  
•  DIY	
  performance	
  data	
  warehouse	
  
www.enkitec.com	
   30	
  
run_awr	
  
run_extract	
  
Extract	
  AWR	
  data	
  points	
  as	
  csv	
  files	
  
Package	
  all	
  the	
  csv	
  files	
  Customer	
  site	
  
FRESH_LOAD	
  
CHECK_LOAD	
  
DELTA_LOAD	
  
Create	
  new	
  client	
  “dimension”	
  tables	
  
Check	
  new	
  data	
  points	
  
Load	
  new	
  data	
  points	
  
DIY	
  DW	
  server	
  
awr_topevents_(ClientNameX)	
  
awr_cpuwl_(ClientNameX)	
  
awr_iowl_(ClientNameX)	
  
1
2
3 Tableau	
  AnalyOcs	
  
awr_topevents_(ClientNameY)	
  
awr_cpuwl_(ClientNameY)	
  
awr_iowl_(ClientNameY)	
  
awr_topevents_(ClientNameZ)	
  
awr_cpuwl_(ClientNameZ)	
  
awr_iowl_(ClientNameZ)	
  
www.enkitec.com	
   31	
  
•  Tableau	
  auto	
  creates	
  a	
  Ome	
  dimension	
  for	
  the	
  Ome	
  
column	
  “MM/DD/YY	
  HH24:MI:SS”	
  of	
  AWR	
  csv	
  
output	
  
www.enkitec.com	
   32	
  
www.enkitec.com	
   33	
  
•  Summary	
  and	
  Underlying	
  data	
  
1-­‐2AM	
  
2-­‐3AM	
  
www.enkitec.com	
   34	
  
CPU	
  usage	
  across	
  half	
  rack	
  Exadata	
  
www.enkitec.com	
   35	
  
CPU	
  usage	
  per	
  host	
  
www.enkitec.com	
   36	
  
CPU	
  redistribuOon	
  across	
  nodes	
  
Wrap	
  up!	
  
•  HOWTO	
  compare	
  CPU	
  speeds	
  
o  SPECint_rate2006,	
  TPC-­‐C,	
  Actual	
  benchmarking	
  
	
  
•  Cores	
  vs	
  Threads	
  
o  Always	
  have	
  HT	
  on	
  
o  ~30%	
  performance	
  benefit	
  auer	
  core	
  count	
  
•  The	
  different	
  CPU	
  events	
  
o  1	
  AAS	
  CPU	
  =	
  1	
  CPU	
  core	
  
o  Oracle	
  CPU	
  may	
  not	
  correlate	
  with	
  Host	
  CPU	
  if	
  you	
  have	
  a	
  lot	
  of	
  
CPU	
  acOvity	
  outside	
  of	
  the	
  database	
  
	
  
•  CPU	
  Monitoring/Capacity	
  Planning	
  on	
  consolidated	
  environments	
  
o  AWR	
  analyOcs	
  
www.enkitec.com	
   37	
  
Resources	
  
•  cputoolkit	
  -­‐	
  hPp://karlarao.wordpress.com/scripts-­‐resources/	
  
•  AWR	
  Tableau	
  and	
  R	
  toolkit	
  VisualizaOon	
  Examples	
  -­‐	
  hPp://goo.gl/xZHHY	
  
•  AAS	
  invesOgaOon	
  -­‐	
  hPp://goo.gl/5WaAg	
  
•  Cores	
  vs	
  Threads	
  -­‐	
  hPp://goo.gl/1MLFf	
  
•  Turbostat.c	
  -­‐	
  hPp://goo.gl/jDUKg	
  
•  cpu_topology	
  -­‐	
  hPp://goo.gl/EUDG7	
  
•  CPU	
  centric	
  benchmark	
  comparisons	
  -­‐	
  hPp://goo.gl/nR9Yy	
  
•  SLOB	
  -­‐	
  hPp://goo.gl/yKa45	
  
•  Kyle	
  Hailey	
  -­‐	
  hPp://dbopOmizer.com/2011/07/21/oracle-­‐cpu-­‐Ome/	
  
•  The	
  mindmap	
  of	
  this	
  presentaOon	
  -­‐	
  hPp://goo.gl/XeY0e	
  
www.enkitec.com	
   38	
  
karl.arao@enkitec.com	
  
39
Fastest Growing Companies
in Dallas

More Related Content

PDF
RMOUG 2013 - Where did my CPU go?
PDF
BURA Supercomputer
PDF
ZFSperftools2012
PDF
Extreme Linux Performance Monitoring and Tuning
PDF
IDF'16 San Francisco - Overclocking Session
PDF
Computing Performance: On the Horizon (2021)
PDF
Linux Performance 2018 (PerconaLive keynote)
PDF
Kernel Recipes 2017: Performance Analysis with BPF
RMOUG 2013 - Where did my CPU go?
BURA Supercomputer
ZFSperftools2012
Extreme Linux Performance Monitoring and Tuning
IDF'16 San Francisco - Overclocking Session
Computing Performance: On the Horizon (2021)
Linux Performance 2018 (PerconaLive keynote)
Kernel Recipes 2017: Performance Analysis with BPF

What's hot (17)

PDF
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
PDF
Trip down the GPU lane with Machine Learning
POTX
Performance Tuning EC2 Instances
PDF
Kernel debug log and console on openSUSE
PDF
LISA2019 Linux Systems Performance
PDF
ATO Linux Performance 2018
PPTX
QCon 2015 Broken Performance Tools
PDF
The Magic of Hot Streaming Replication, Bruce Momjian
PDF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
PDF
YOW2021 Computing Performance
PDF
ACPI Debugging from Linux Kernel
PDF
Velocity 2017 Performance analysis superpowers with Linux eBPF
PPT
Linux Crash Dump Capture and Analysis
PDF
Linux Kernel Debugging Essentials workshop
PDF
Kernel Recipes 2015 - Kernel dump analysis
PDF
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Trip down the GPU lane with Machine Learning
Performance Tuning EC2 Instances
Kernel debug log and console on openSUSE
LISA2019 Linux Systems Performance
ATO Linux Performance 2018
QCon 2015 Broken Performance Tools
The Magic of Hot Streaming Replication, Bruce Momjian
Linux 4.x Tracing: Performance Analysis with bcc/BPF
YOW2021 Computing Performance
ACPI Debugging from Linux Kernel
Velocity 2017 Performance analysis superpowers with Linux eBPF
Linux Crash Dump Capture and Analysis
Linux Kernel Debugging Essentials workshop
Kernel Recipes 2015 - Kernel dump analysis
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
Ad

Similar to Where Did My Cpu Go? (20)

PDF
RedGateWebinar - Where did my CPU go?
PDF
OOW 2013: Where did my CPU go
PDF
Rmoug13 - where did my CPU go?
PDF
Where Did My CPU Go?
PDF
Whitepaper: Where did my CPU go?
PPTX
Sql server engine cpu cache as the new ram
PDF
Deep Dive on Amazon EC2 Instances (March 2017)
PPSX
Oracle Performance Tuning Fundamentals
PPTX
VDI Design Guide
PPTX
Yashi dealer meeting settembre 2016 tecnologie xeon intel italia
PPTX
Citrix TechXperts Perth May 2016
PPTX
Super scaling singleton inserts
PDF
A Consolidation Success Story
PDF
Performance of three Intel-based SMB servers running Web, email, and database...
PDF
Intel xeon e5v3 y sdi
PPTX
Sql sever engine batch mode and cpu architectures
PPTX
Hardware-aware thread scheduling: the case of asymmetric multicore processors
PDF
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
PDF
A close encounter_with_real_world_and_odd_perf_issues
PDF
High Performance Hardware for Data Analysis
RedGateWebinar - Where did my CPU go?
OOW 2013: Where did my CPU go
Rmoug13 - where did my CPU go?
Where Did My CPU Go?
Whitepaper: Where did my CPU go?
Sql server engine cpu cache as the new ram
Deep Dive on Amazon EC2 Instances (March 2017)
Oracle Performance Tuning Fundamentals
VDI Design Guide
Yashi dealer meeting settembre 2016 tecnologie xeon intel italia
Citrix TechXperts Perth May 2016
Super scaling singleton inserts
A Consolidation Success Story
Performance of three Intel-based SMB servers running Web, email, and database...
Intel xeon e5v3 y sdi
Sql sever engine batch mode and cpu architectures
Hardware-aware thread scheduling: the case of asymmetric multicore processors
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
A close encounter_with_real_world_and_odd_perf_issues
High Performance Hardware for Data Analysis
Ad

More from Enkitec (20)

PDF
Using Angular JS in APEX
PDF
Controlling execution plans 2014
PDF
Engineered Systems: Environment-as-a-Service Demonstration
PDF
Think Exa!
PDF
In Memory Database In Action by Tanel Poder and Kerry Osborne
PDF
In Search of Plan Stability - Part 1
PDF
Mini Session - Using GDB for Profiling
PDF
Profiling Oracle with GDB
PDF
Oracle Performance Tools of the Trade
PDF
Oracle Performance Tuning Fundamentals
PDF
SQL Tuning Tools of the Trade
PDF
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
PDF
Oracle GoldenGate Architecture Performance
PDF
OGG Architecture Performance
PDF
APEX Security Primer
PDF
How Many Ways Can I Manage Oracle GoldenGate?
PDF
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
PDF
Sql tuning made easier with sqltxplain (sqlt)
PDF
Profiling the logwriter and database writer
PDF
Fatkulin hotsos 2014
Using Angular JS in APEX
Controlling execution plans 2014
Engineered Systems: Environment-as-a-Service Demonstration
Think Exa!
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Search of Plan Stability - Part 1
Mini Session - Using GDB for Profiling
Profiling Oracle with GDB
Oracle Performance Tools of the Trade
Oracle Performance Tuning Fundamentals
SQL Tuning Tools of the Trade
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Oracle GoldenGate Architecture Performance
OGG Architecture Performance
APEX Security Primer
How Many Ways Can I Manage Oracle GoldenGate?
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Sql tuning made easier with sqltxplain (sqlt)
Profiling the logwriter and database writer
Fatkulin hotsos 2014

Recently uploaded (20)

PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
A Presentation on Touch Screen Technology
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Hybrid model detection and classification of lung cancer
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Getting Started with Data Integration: FME Form 101
PPTX
A Presentation on Artificial Intelligence
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Mushroom cultivation and it's methods.pdf
NewMind AI Weekly Chronicles - August'25-Week II
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
MIND Revenue Release Quarter 2 2025 Press Release
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative analysis of optical character recognition models for extracting...
Programs and apps: productivity, graphics, security and other tools
A Presentation on Touch Screen Technology
A novel scalable deep ensemble learning framework for big data classification...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Hybrid model detection and classification of lung cancer
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Unlocking AI with Model Context Protocol (MCP)
Getting Started with Data Integration: FME Form 101
A Presentation on Artificial Intelligence
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Where Did My Cpu Go?

  • 1. “Where  did  my  CPU  go?”   monitoring  &  capacity  planning   adventures  on  a  consolidated   environment   Presented  by:     Karl  Arao   1
  • 2. whoami   Karl  Arao   •  Senior  Technical  Consultant  @  Enkitec   •  Performance  and  Capacity  Planning  Enthusiast       7  years  DBA  experience   Oracle  ACE,  OCP-­‐DBA,  RHCE,  OakTable   Blog:  karlarao.wordpress.com   Wiki:  karlarao.Oddlyspot.com   TwiPer:  @karlarao     www.enkitec.com   2  
  • 4. Agenda   •  HOWTO  compare  CPU  speeds     •  Cores  vs  Threads   •  The  different  CPU  events   •  CPU  Monitoring/Capacity  Planning  on  consolidated  environments       www.enkitec.com   4  
  • 5. www.enkitec.com   5   12:27:15 SYS@DEMO1> show parameter cpu_count! ! NAME TYPE VALUE! ------------------------------------ ----------- --------! cpu_count integer 16!
  • 6. www.enkitec.com   6   Socket0 Core0 CPU0 CPU8 Core1 CPU1 CPU9 Core2 CPU2 CPU10 Core3 CPU3 CPU11 Socket1 Core0 CPU4 CPU12 Core1 CPU5 CPU13 Core2 CPU6 CPU14 Core3 CPU7 CPU15 Exadata  V2  =>  2s8c16t  
  • 7. PART1:  compare  CPU  speeds   www.enkitec.com   7  
  • 8. Different  methods:   •  Published  benchmarks   – TPC-­‐C   – SPECint_rate2006   •  Actual  Benchmarking   – cputoolkit   – SLOB  (lio  test)   www.enkitec.com   8  
  • 9. TPC-­‐C   •  TransacOon  Processing  Performance  Council  (TPC)   •  Throughput  =>  transacOons  per  minute  (tpmC)   •  Price/Performance  =>  USD  /  tpmC   www.enkitec.com   9   •  CPU  performance  =>  tpmC  /  core   •  1609186.39  /  16  =  100574  
  • 10. SPECint_rate2006   •  Standard  Performance  EvaluaOon  CorporaOon  (SPEC)   •  SPECint_rate2006     •  Integer  performance   •  All  CPUs  are  used   •  Used  by  OEM12c  ConsolidaOon  Planner  (SYSMAN.EMCT_SPEC_RATE_LIB)   •  CPU  performance  =>  SPECint_rate2006/core   •  702/16  =  43.875   www.enkitec.com   10   $ cat spec.txt | grep -i sun | grep -i x3-2 | sort -rnk1! 44.0625, 16, 2, 8, 2, 632, 705, Oracle Corporation, Sun Blade X3-2B (Intel Xeon E5-2690 2.9GHz)! 44.0625, 16, 2, 8, 2, 630, 705, Oracle Corporation, Sun Server X3-2L (Intel Xeon E5-2690 2.9GHz)! 43.875, 16, 2, 8, 2, 628, 702, Oracle Corporation, Sun Server X3-2 (Intel Xeon E5-2690 2.9GHz)! !
  • 11. 2007  vs  2012   www.enkitec.com   11   tpmC/core, System, tpmC, Price/Perf, Total System Cost, Currency, Database Software, Server CPU Type, Total Server Cores, Cluster, Date Submitted Result/# Cores, # Cores, # Chips, # Cores Per Chip, # Threads Per Core, Baseline, Result, Hardware Vendor, System
  • 12. Actual  Benchmarking   •  cputoolkit  and  SLOB  (lio  test)   •  LIOs/sec   www.enkitec.com   12   CPU1   CPU2   CPU3   CPU4   CPU5   CPU6   CPU7   CPU8   CPU1   CPU2   CPU3   CPU4   CPU5   CPU6   CPU7   CPU8   cputoolkit   ./runcputoolkit-­‐auto  <start  CPU>  <end  CPU>  <db  name>   ./runcputoolkit-­‐auto  1  2  dw   SLOB   ./runit.sh  <writers>  <readers>   while  :;  do  ./runit.sh  0  2;  done   Both  at  25%     CPU  uElizaEon  
  • 13. V2  and  X2  CPU  perf  comparison   www.enkitec.com   13   3.6M LIOs/sec 2.1M LIOs/sec
  • 14. V2  -­‐>  X2  migraOon   www.enkitec.com   14   chip  efficiency  factor    =  (source  LIOs/sec)  /  (desOnaOon  LIOs/sec)                                                                                =  2.1M  /  3.6M                                                                                =  .5833     X2  CPU  requirement      =  source  host  CPUs  *  uOlizaOon  *  chip  efficiency  factor                                                                                =  16  *  .46                                                                                  =  7.36    *  .5833                                                                                =  4.29  CPUs     X2  CPU  UOlizaOon              =  CPU  requirement  /  CPU  capacity                                                                                =  4.29  /  24                                                                                =  17.8  %     V2 X2
  • 15. PART2:  Cores  vs  Threads   www.enkitec.com   15   Socket0 Core0 Core1 Core2 Core3 Socket0 Core0 CPU1 CPU5 Core1 CPU2 CPU6 Core2 CPU3 CPU7 Core3 CPU4 CPU8
  • 17. ~30%  depends  on  the  workload   www.enkitec.com   17   cputoolkit   SLOB   17%   21%   Intel HT Technology Technical User's Guide http://goo.gl/3Ec5Z
  • 18. PART3:  Different  CPU  events   CPU   CPU  Wait   CPU  Scheduler     www.enkitec.com   18  
  • 19. www.enkitec.com   19   AAS  CPU  
  • 25. www.enkitec.com   25   Pupng  it  all  together   Instances  Caged   at  12  CPUs   SQL  Applied  to  lock   in  good  plan.   Problem:  A  single  SQL  Stmt.  overwhelming   CPU  resources.  
  • 26. PART4:  CPU  monitoring  and   Capacity  Planning     www.enkitec.com   26  
  • 27. OS  Tools   •  The  usual  OperaOng  System  commands   –  vmstat   –  top   –  mpstat  –P  ALL  1  5   •  Cool  tools     –  collectl  –sC    (hPp://collectl.sourceforge.net)   –  turbostat.c   –  dcli  (Exadata)   •  dcli  -­‐l  oracle  -­‐g  /home/oracle/dbs_group  -­‐-­‐vmstat  2   •  dcli  -­‐l  oracle  -­‐g  /home/oracle/dbs_group  upOme   www.enkitec.com   27  
  • 28. www.enkitec.com   28   Load  Map  
  • 29. www.enkitec.com   29   Performance  Page  –  Historical  View  
  • 30. AWR  Toolkit   •  DIY  performance  data  warehouse   www.enkitec.com   30   run_awr   run_extract   Extract  AWR  data  points  as  csv  files   Package  all  the  csv  files  Customer  site   FRESH_LOAD   CHECK_LOAD   DELTA_LOAD   Create  new  client  “dimension”  tables   Check  new  data  points   Load  new  data  points   DIY  DW  server   awr_topevents_(ClientNameX)   awr_cpuwl_(ClientNameX)   awr_iowl_(ClientNameX)   1 2 3 Tableau  AnalyOcs   awr_topevents_(ClientNameY)   awr_cpuwl_(ClientNameY)   awr_iowl_(ClientNameY)   awr_topevents_(ClientNameZ)   awr_cpuwl_(ClientNameZ)   awr_iowl_(ClientNameZ)  
  • 32. •  Tableau  auto  creates  a  Ome  dimension  for  the  Ome   column  “MM/DD/YY  HH24:MI:SS”  of  AWR  csv   output   www.enkitec.com   32  
  • 33. www.enkitec.com   33   •  Summary  and  Underlying  data   1-­‐2AM   2-­‐3AM  
  • 34. www.enkitec.com   34   CPU  usage  across  half  rack  Exadata  
  • 35. www.enkitec.com   35   CPU  usage  per  host  
  • 36. www.enkitec.com   36   CPU  redistribuOon  across  nodes  
  • 37. Wrap  up!   •  HOWTO  compare  CPU  speeds   o  SPECint_rate2006,  TPC-­‐C,  Actual  benchmarking     •  Cores  vs  Threads   o  Always  have  HT  on   o  ~30%  performance  benefit  auer  core  count   •  The  different  CPU  events   o  1  AAS  CPU  =  1  CPU  core   o  Oracle  CPU  may  not  correlate  with  Host  CPU  if  you  have  a  lot  of   CPU  acOvity  outside  of  the  database     •  CPU  Monitoring/Capacity  Planning  on  consolidated  environments   o  AWR  analyOcs   www.enkitec.com   37  
  • 38. Resources   •  cputoolkit  -­‐  hPp://karlarao.wordpress.com/scripts-­‐resources/   •  AWR  Tableau  and  R  toolkit  VisualizaOon  Examples  -­‐  hPp://goo.gl/xZHHY   •  AAS  invesOgaOon  -­‐  hPp://goo.gl/5WaAg   •  Cores  vs  Threads  -­‐  hPp://goo.gl/1MLFf   •  Turbostat.c  -­‐  hPp://goo.gl/jDUKg   •  cpu_topology  -­‐  hPp://goo.gl/EUDG7   •  CPU  centric  benchmark  comparisons  -­‐  hPp://goo.gl/nR9Yy   •  SLOB  -­‐  hPp://goo.gl/yKa45   •  Kyle  Hailey  -­‐  hPp://dbopOmizer.com/2011/07/21/oracle-­‐cpu-­‐Ome/   •  The  mindmap  of  this  presentaOon  -­‐  hPp://goo.gl/XeY0e   www.enkitec.com   38   karl.arao@enkitec.com