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