SlideShare une entreprise Scribd logo
1  sur  42
“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


6 years 11 months 12 days DBA experience
   Oracle ACE, OCP-DBA, RHCE, OakTable
   Blog: karlarao.wordpress.com
   Wiki: karlarao.tiddlyspot.com
   Twitter: @karlarao




                                     www.enkitec.com   2
Agenda
• HOWTO compare CPU speeds

• Cores vs Threads

• The different CPU events

• CPU Monitoring/Capacity Planning on consolidated environments




                              www.enkitec.com                     3
12:27:15 SYS@DEMO1> show parameter cpu_count

NAME                                 TYPE        VALUE
------------------------------------ ----------- --------
cpu_count                            integer     16




                        www.enkitec.com                     4
Exadata V2 => 2s8c16t
CPU0   CPU8    CPU1   CPU9    CPU2     CPU10       CPU3   CPU11


  Core0          Core1             Core2               Core3
                         Socket0



CPU4   CPU12   CPU5   CPU13   CPU6     CPU14       CPU7   CPU15


  Core0          Core1             Core2               Core3
                         Socket1




                                     www.enkitec.com              5
PART1: compare CPU speeds




          www.enkitec.com   6
Different methods:
• Published benchmarks
  – TPC-C
  – SPECint_rate2006
• Actual Benchmarking
  – cputoolkit
  – SLOB (lio test)




                       www.enkitec.com   7
TPC-C
• Transaction Processing Performance Council (TPC)
   • Throughput => transactions per minute (tpmC)
   • Price/Performance => USD / tpmC




• CPU performance => tpmC / core
  • 1609186.39 / 16 = 100574

                       www.enkitec.com               8
SPECint_rate2006
  • Standard Performance Evaluation Corporation (SPEC)
     • SPECint_rate2006
         • Integer performance
         • All CPUs are used
         • Used by OEM12c Consolidation Planner (SYSMAN.EMCT_SPEC_RATE_LIB)
  • CPU performance => SPECint_rate2006/core
     • 702/16 = 43.875




$ 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)


                                          www.enkitec.com                                  9
2007 vs 2012




   www.enkitec.com   10
Actual Benchmarking
• cputoolkit and SLOB (lio test)
• LIOs/sec
          cputoolkit                                             SLOB
          ./runcputoolkit-auto <start CPU> <end CPU> <db name>   ./runit.sh <writers> <readers>
          ./runcputoolkit-auto 1 2 dw                            while :; do ./runit.sh 0 2; done


                          CPU1                                        CPU1

                          CPU2                                        CPU2

                          CPU3                                        CPU3

                          CPU4
                                          Both at 25%
                                                                      CPU4
                                          CPU utilization
                          CPU5                                        CPU5

                          CPU6                                        CPU6

                          CPU7                                        CPU7

                          CPU8                                        CPU8

                                             www.enkitec.com                                        11
V2 and X2 CPU perf comparison
                    3.6M LIOs/sec



            2.1M LIOs/sec




            www.enkitec.com         12
V2 -> X2 migration


                                   V2                                           X2




chip efficiency factor = (source LIOs/sec) / (destination LIOs/sec)
                       = 2.1M / 3.6M
                       = .5833

X2 CPU requirement = source host CPUs * utilization * chip efficiency factor
                   = 16 * .46
                   = 7.36 * .5833
                   = 4.29 CPUs

X2 CPU Utilization    = CPU requirement / CPU capacity
                      = 4.29 / 24
                      = 17.8 %
                                    www.enkitec.com                            13
Core0         Core1               Core2        Core3
                        Socket0


 PART2: Cores vs Threads
CPU1   CPU5   CPU2   CPU6       CPU3    CPU7   CPU4   CPU8


  Core0         Core1               Core2        Core3
                        Socket0



                      www.enkitec.com                        14
www.enkitec.com   15
~30% depends on the workload

   cputoolkit                                       SLOB




                17%                                        21%




 Intel HT Technology Technical User's Guide http://goo.gl/3Ec5Z



                         www.enkitec.com                          16
PART3: Different CPU events
            CPU
         CPU Wait
      CPU Scheduler


           www.enkitec.com    17
AAS CPU




 www.enkitec.com   18
www.enkitec.com   19
CPU Wait




 www.enkitec.com   20
www.enkitec.com   21
CPU Scheduler




   www.enkitec.com   25
www.enkitec.com   26
Putting it all together




Problem: A single SQL Stmt. overwhelming      Instances Caged   SQL Applied to lock
CPU resources.                                at 12 CPU’s ea.   in good plan.

                                           www.enkitec.com                            27
BEFORE:
procs -----
r
52
58
50
58
49
                     load average: 10.36, 17.76, 36.42
AFTER:
procs ------
r
13
13                               After       Before
12
12
14




               www.enkitec.com                           28
PART4: CPU monitoring and
    Capacity Planning




          www.enkitec.com   29
OS Tools
• The usual Operating System commands
   – vmstat
   – top
   – mpstat –P ALL 1 5
• Cool tools
   – collectl –sC (http://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 uptime




                                     www.enkitec.com           30
Load Map




 www.enkitec.com   31
Performance Page – Historical View




              www.enkitec.com        32
AWR Toolkit
• DIY performance data warehouse
                         run_awr             Extract AWR data points as csv files
1   Customer site        run_extract         Package all the csv files

                         FRESH_LOAD          Create new client “dimension” tables
2   DIY DW server        CHECK_LOAD          Check new data points
                         DELTA_LOAD          Load new data points


       awr_topevents_(ClientNameX)   awr_topevents_(ClientNameY)   awr_topevents_(ClientNameZ)
       awr_cpuwl_(ClientNameX)       awr_cpuwl_(ClientNameY)       awr_cpuwl_(ClientNameZ)
       awr_iowl_(ClientNameX)        awr_iowl_(ClientNameY)        awr_iowl_(ClientNameZ)




3   Tableau Analytics


                                      www.enkitec.com                                      33
www.enkitec.com   34
• Tableau auto creates a time dimension for the time
  column “MM/DD/YY HH24:MI:SS” of AWR csv output




              www.enkitec.com                  35
• Summary and Underlying data




       1-2AM



       2-3AM




                     www.enkitec.com   36
CPU usage across half rack Exadata




              www.enkitec.com        37
CPU usage per host




      www.enkitec.com   38
CPU redistribution across nodes




            www.enkitec.com       39
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 after 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 activity outside of the database

• CPU Monitoring/Capacity Planning on consolidated environments
   o AWR analytics
                              www.enkitec.com                     40
Resources
•   cputoolkit - http://karlarao.wordpress.com/scripts-resources/
•   AWR Tableau and R toolkit Visualization Examples - http://goo.gl/xZHHY
•   AAS investigation - http://goo.gl/5WaAg
•   Cores vs Threads - http://goo.gl/1MLFf
•   Turbostat.c - http://goo.gl/jDUKg
•   cpu_topology - http://goo.gl/EUDG7
•   CPU centric benchmark comparisons - http://goo.gl/nR9Yy
•   SLOB - http://goo.gl/yKa45
•   Kyle Hailey - http://dboptimizer.com/2011/07/21/oracle-cpu-time/
•   The mindmap of this presentation - http://goo.gl/XeY0e


                   karl.arao@enkitec.com
                                 www.enkitec.com                             41
Fastest Growing Companies
                       in Dallas

42

Contenu connexe

Tendances

Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugginglibfetion
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisBuland Singh
 
“Automation Testing for Embedded Systems”
“Automation Testing for Embedded Systems” “Automation Testing for Embedded Systems”
“Automation Testing for Embedded Systems” GlobalLogic Ukraine
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”GlobalLogic Ukraine
 
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architectureKernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architectureAnne Nicolas
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSESUSE Labs Taipei
 
Kernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementKernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementAnne Nicolas
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
 
Linux Kernel Debugging Essentials workshop
Linux Kernel Debugging Essentials workshopLinux Kernel Debugging Essentials workshop
Linux Kernel Debugging Essentials workshopLubomir Rintel
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerunidsecconf
 
Kdump-FUDcon-2015-Session
Kdump-FUDcon-2015-SessionKdump-FUDcon-2015-Session
Kdump-FUDcon-2015-SessionBuland Singh
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesIO Visor Project
 
QCon 2015 Broken Performance Tools
QCon 2015 Broken Performance ToolsQCon 2015 Broken Performance Tools
QCon 2015 Broken Performance ToolsBrendan Gregg
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019Brendan Gregg
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisBuland Singh
 
UM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareUM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareBrendan Gregg
 

Tendances (20)

Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
“Automation Testing for Embedded Systems”
“Automation Testing for Embedded Systems” “Automation Testing for Embedded Systems”
“Automation Testing for Embedded Systems”
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”
 
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architectureKernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - Porting Linux to a new processor architecture
 
BURA Supercomputer
BURA SupercomputerBURA Supercomputer
BURA Supercomputer
 
Kernel debug log and console on openSUSE
Kernel debug log and console on openSUSEKernel debug log and console on openSUSE
Kernel debug log and console on openSUSE
 
Kernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementKernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power Management
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
Linux Kernel Debugging Essentials workshop
Linux Kernel Debugging Essentials workshopLinux Kernel Debugging Essentials workshop
Linux Kernel Debugging Essentials workshop
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
 
Kdump-FUDcon-2015-Session
Kdump-FUDcon-2015-SessionKdump-FUDcon-2015-Session
Kdump-FUDcon-2015-Session
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
bcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challengesbcc/BPF tools - Strategy, current tools, future challenges
bcc/BPF tools - Strategy, current tools, future challenges
 
QCon 2015 Broken Performance Tools
QCon 2015 Broken Performance ToolsQCon 2015 Broken Performance Tools
QCon 2015 Broken Performance Tools
 
eBPF Perf Tools 2019
eBPF Perf Tools 2019eBPF Perf Tools 2019
eBPF Perf Tools 2019
 
Kernel crashdump
Kernel crashdumpKernel crashdump
Kernel crashdump
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
UM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareUM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of Software
 

Similaire à Rmoug13 - where did my CPU go?

RedGateWebinar - Where did my CPU go?
RedGateWebinar - Where did my CPU go?RedGateWebinar - Where did my CPU go?
RedGateWebinar - Where did my CPU go?Kristofferson A
 
A Consolidation Success Story by Karl Arao
A Consolidation Success Story by Karl AraoA Consolidation Success Story by Karl Arao
A Consolidation Success Story by Karl AraoEnkitec
 
KSCOPE 2013: Exadata Consolidation Success Story
KSCOPE 2013: Exadata Consolidation Success StoryKSCOPE 2013: Exadata Consolidation Success Story
KSCOPE 2013: Exadata Consolidation Success StoryKristofferson A
 
A Consolidation Success Story
A Consolidation Success StoryA Consolidation Success Story
A Consolidation Success StoryEnkitec
 
The power of linux advanced tracer [POUG18]
The power of linux advanced tracer [POUG18]The power of linux advanced tracer [POUG18]
The power of linux advanced tracer [POUG18]Mahmoud Hatem
 
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...Haidee McMahon
 
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC DirectivesFortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC DirectivesJeff Larkin
 
Trends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient PerformanceTrends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient Performanceinside-BigData.com
 
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines VMworld
 
PowerDRC/LVS 2.0.1 released by POLYTEDA
PowerDRC/LVS 2.0.1 released by POLYTEDAPowerDRC/LVS 2.0.1 released by POLYTEDA
PowerDRC/LVS 2.0.1 released by POLYTEDAAlexander Grudanov
 
Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockScyllaDB
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Michelle Holley
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016Kuniyasu Suzaki
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Clusterbyonggon chun
 
Summary Of Course Projects
Summary Of Course ProjectsSummary Of Course Projects
Summary Of Course Projectsawan2008
 
Tech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product UpdateTech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product UpdateAdaCore
 

Similaire à Rmoug13 - where did my CPU go? (20)

RedGateWebinar - Where did my CPU go?
RedGateWebinar - Where did my CPU go?RedGateWebinar - Where did my CPU go?
RedGateWebinar - Where did my CPU go?
 
A Consolidation Success Story by Karl Arao
A Consolidation Success Story by Karl AraoA Consolidation Success Story by Karl Arao
A Consolidation Success Story by Karl Arao
 
KSCOPE 2013: Exadata Consolidation Success Story
KSCOPE 2013: Exadata Consolidation Success StoryKSCOPE 2013: Exadata Consolidation Success Story
KSCOPE 2013: Exadata Consolidation Success Story
 
A Consolidation Success Story
A Consolidation Success StoryA Consolidation Success Story
A Consolidation Success Story
 
The power of linux advanced tracer [POUG18]
The power of linux advanced tracer [POUG18]The power of linux advanced tracer [POUG18]
The power of linux advanced tracer [POUG18]
 
The Spectre of Meltdowns
The Spectre of MeltdownsThe Spectre of Meltdowns
The Spectre of Meltdowns
 
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017  - ...
Intel's Out of the Box Network Developers Ireland Meetup on March 29 2017 - ...
 
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC DirectivesFortranCon2020: Highly Parallel Fortran and OpenACC Directives
FortranCon2020: Highly Parallel Fortran and OpenACC Directives
 
Trends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient PerformanceTrends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient Performance
 
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines VMworld 2013: Extreme Performance Series: Monster Virtual Machines
VMworld 2013: Extreme Performance Series: Monster Virtual Machines
 
PowerDRC/LVS 2.0.1 released by POLYTEDA
PowerDRC/LVS 2.0.1 released by POLYTEDAPowerDRC/LVS 2.0.1 released by POLYTEDA
PowerDRC/LVS 2.0.1 released by POLYTEDA
 
Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with Sherlock
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
module01.ppt
module01.pptmodule01.ppt
module01.ppt
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Pgopencl
PgopenclPgopencl
Pgopencl
 
PostgreSQL with OpenCL
PostgreSQL with OpenCLPostgreSQL with OpenCL
PostgreSQL with OpenCL
 
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV ClusterMethod of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
Method of NUMA-Aware Resource Management for Kubernetes 5G NFV Cluster
 
Summary Of Course Projects
Summary Of Course ProjectsSummary Of Course Projects
Summary Of Course Projects
 
Tech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product UpdateTech Days 2015: Embedded Product Update
Tech Days 2015: Embedded Product Update
 

Plus de Enkitec

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEXEnkitec
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014Enkitec
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEnkitec
 
Think Exa!
Think Exa!Think Exa!
Think Exa!Enkitec
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1Enkitec
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingEnkitec
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDBEnkitec
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeEnkitec
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeEnkitec
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityEnkitec
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security PrimerEnkitec
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Enkitec
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Enkitec
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 

Plus de Enkitec (20)

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

Rmoug13 - 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 6 years 11 months 12 days DBA experience Oracle ACE, OCP-DBA, RHCE, OakTable Blog: karlarao.wordpress.com Wiki: karlarao.tiddlyspot.com Twitter: @karlarao www.enkitec.com 2
  • 3. Agenda • HOWTO compare CPU speeds • Cores vs Threads • The different CPU events • CPU Monitoring/Capacity Planning on consolidated environments www.enkitec.com 3
  • 4. 12:27:15 SYS@DEMO1> show parameter cpu_count NAME TYPE VALUE ------------------------------------ ----------- -------- cpu_count integer 16 www.enkitec.com 4
  • 5. Exadata V2 => 2s8c16t CPU0 CPU8 CPU1 CPU9 CPU2 CPU10 CPU3 CPU11 Core0 Core1 Core2 Core3 Socket0 CPU4 CPU12 CPU5 CPU13 CPU6 CPU14 CPU7 CPU15 Core0 Core1 Core2 Core3 Socket1 www.enkitec.com 5
  • 6. PART1: compare CPU speeds www.enkitec.com 6
  • 7. Different methods: • Published benchmarks – TPC-C – SPECint_rate2006 • Actual Benchmarking – cputoolkit – SLOB (lio test) www.enkitec.com 7
  • 8. TPC-C • Transaction Processing Performance Council (TPC) • Throughput => transactions per minute (tpmC) • Price/Performance => USD / tpmC • CPU performance => tpmC / core • 1609186.39 / 16 = 100574 www.enkitec.com 8
  • 9. SPECint_rate2006 • Standard Performance Evaluation Corporation (SPEC) • SPECint_rate2006 • Integer performance • All CPUs are used • Used by OEM12c Consolidation Planner (SYSMAN.EMCT_SPEC_RATE_LIB) • CPU performance => SPECint_rate2006/core • 702/16 = 43.875 $ 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) www.enkitec.com 9
  • 10. 2007 vs 2012 www.enkitec.com 10
  • 11. Actual Benchmarking • cputoolkit and SLOB (lio test) • LIOs/sec cputoolkit SLOB ./runcputoolkit-auto <start CPU> <end CPU> <db name> ./runit.sh <writers> <readers> ./runcputoolkit-auto 1 2 dw while :; do ./runit.sh 0 2; done CPU1 CPU1 CPU2 CPU2 CPU3 CPU3 CPU4 Both at 25% CPU4 CPU utilization CPU5 CPU5 CPU6 CPU6 CPU7 CPU7 CPU8 CPU8 www.enkitec.com 11
  • 12. V2 and X2 CPU perf comparison 3.6M LIOs/sec 2.1M LIOs/sec www.enkitec.com 12
  • 13. V2 -> X2 migration V2 X2 chip efficiency factor = (source LIOs/sec) / (destination LIOs/sec) = 2.1M / 3.6M = .5833 X2 CPU requirement = source host CPUs * utilization * chip efficiency factor = 16 * .46 = 7.36 * .5833 = 4.29 CPUs X2 CPU Utilization = CPU requirement / CPU capacity = 4.29 / 24 = 17.8 % www.enkitec.com 13
  • 14. Core0 Core1 Core2 Core3 Socket0 PART2: Cores vs Threads CPU1 CPU5 CPU2 CPU6 CPU3 CPU7 CPU4 CPU8 Core0 Core1 Core2 Core3 Socket0 www.enkitec.com 14
  • 16. ~30% depends on the workload cputoolkit SLOB 17% 21% Intel HT Technology Technical User's Guide http://goo.gl/3Ec5Z www.enkitec.com 16
  • 17. PART3: Different CPU events CPU CPU Wait CPU Scheduler www.enkitec.com 17
  • 22.
  • 23.
  • 24.
  • 25. CPU Scheduler www.enkitec.com 25
  • 27. Putting it all together Problem: A single SQL Stmt. overwhelming Instances Caged SQL Applied to lock CPU resources. at 12 CPU’s ea. in good plan. www.enkitec.com 27
  • 28. BEFORE: procs ----- r 52 58 50 58 49 load average: 10.36, 17.76, 36.42 AFTER: procs ------ r 13 13 After Before 12 12 14 www.enkitec.com 28
  • 29. PART4: CPU monitoring and Capacity Planning www.enkitec.com 29
  • 30. OS Tools • The usual Operating System commands – vmstat – top – mpstat –P ALL 1 5 • Cool tools – collectl –sC (http://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 uptime www.enkitec.com 30
  • 32. Performance Page – Historical View www.enkitec.com 32
  • 33. AWR Toolkit • DIY performance data warehouse run_awr Extract AWR data points as csv files 1 Customer site run_extract Package all the csv files FRESH_LOAD Create new client “dimension” tables 2 DIY DW server CHECK_LOAD Check new data points DELTA_LOAD Load new data points awr_topevents_(ClientNameX) awr_topevents_(ClientNameY) awr_topevents_(ClientNameZ) awr_cpuwl_(ClientNameX) awr_cpuwl_(ClientNameY) awr_cpuwl_(ClientNameZ) awr_iowl_(ClientNameX) awr_iowl_(ClientNameY) awr_iowl_(ClientNameZ) 3 Tableau Analytics www.enkitec.com 33
  • 35. • Tableau auto creates a time dimension for the time column “MM/DD/YY HH24:MI:SS” of AWR csv output www.enkitec.com 35
  • 36. • Summary and Underlying data 1-2AM 2-3AM www.enkitec.com 36
  • 37. CPU usage across half rack Exadata www.enkitec.com 37
  • 38. CPU usage per host www.enkitec.com 38
  • 39. CPU redistribution across nodes www.enkitec.com 39
  • 40. 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 after 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 activity outside of the database • CPU Monitoring/Capacity Planning on consolidated environments o AWR analytics www.enkitec.com 40
  • 41. Resources • cputoolkit - http://karlarao.wordpress.com/scripts-resources/ • AWR Tableau and R toolkit Visualization Examples - http://goo.gl/xZHHY • AAS investigation - http://goo.gl/5WaAg • Cores vs Threads - http://goo.gl/1MLFf • Turbostat.c - http://goo.gl/jDUKg • cpu_topology - http://goo.gl/EUDG7 • CPU centric benchmark comparisons - http://goo.gl/nR9Yy • SLOB - http://goo.gl/yKa45 • Kyle Hailey - http://dboptimizer.com/2011/07/21/oracle-cpu-time/ • The mindmap of this presentation - http://goo.gl/XeY0e karl.arao@enkitec.com www.enkitec.com 41