6. Agenda
• HOWTO
compare
CPU
speeds
• Cores
vs
Threads
• The
different
CPU
events
• CPU
Monitoring/Capacity
Planning
on
consolidated
environments
www.enkitec.com
6
7. www.enkitec.com
7
12:27:15 SYS@DEMO1> show parameter cpu_count!
!
NAME TYPE VALUE!
------------------------------------ ----------- --------!
cpu_count integer 16!
12. SPECint_rate2006
• Standard
Performance
EvaluaPon
CorporaPon
(SPEC)
• SPECint_rate2006
• Integer
performance
• All
CPUs
are
used
• Used
by
OEM12c
ConsolidaPon
Planner
(SYSMAN.EMCT_SPEC_RATE_LIB)
• CPU
performance
=>
SPECint_rate2006/core
• 702/16
=
43.875
www.enkitec.com
12
$ 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)!
!
13. 2007
vs
2012
www.enkitec.com
13
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
14. Actual
Benchmarking
• cputoolkit
and
SLOB
(lio
test)
• LIOs/sec
www.enkitec.com
14
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
15. V2
and
X2
CPU
perf
comparison
www.enkitec.com
15
3.6M LIOs/sec
2.1M LIOs/sec
28. www.enkitec.com
28
Pupng
it
all
together
Instances
Caged
at
12
CPUs
SQL
Applied
to
lock
in
good
plan.
Problem:
A
single
SQL
Stmt.
overwhelming
CPU
resources.
33. AWR
Toolkit
• DIY
performance
data
warehouse
www.enkitec.com
33
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
AnalyPcs
awr_topevents_(ClientNameY)
awr_cpuwl_(ClientNameY)
awr_iowl_(ClientNameY)
awr_topevents_(ClientNameZ)
awr_cpuwl_(ClientNameZ)
awr_iowl_(ClientNameZ)
34. AWR
data
• Top
Events
– AAS
CPU,
latency,
wait
class
• SYSSTAT
– PGA,
SGA,
physical
memory,
Executes/sec
• IO
– IOPS
breakdown,
MB/s
• CPU
– Load
Average,
NUM_CPUs,
• Storage
– total
storage
size,
per
tablespace
size
• Services
– distribuPon
of
workload/modules
• Top
SQL
– PIOs,
LIOs,
modules,
SQL
type,
SQL_ID,
PX
Correlate
across
months
of
workload
data!
h3p://goo.gl/7uCk7w
41. 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
aver
core
count
• The
different
CPU
events
o 1
AAS
CPU
=
1
CPU
thread
o Oracle
CPU
may
not
correlate
with
Host
CPU
if
you
have
a
lot
of
CPU
acPvity
outside
of
the
database
• CPU
Monitoring/Capacity
Planning
on
consolidated
environments
o AWR
analyPcs
www.enkitec.com
41
42. Resources
• White
paper:
h^p://goo.gl/eq9Sn
• cputoolkit
-‐
hQp://karlarao.wordpress.com/scripts-‐resources/
• AWR
Tableau
and
R
toolkit
VisualizaPon
Examples
-‐
hQp://goo.gl/xZHHY
• AAS
invesPgaPon
-‐
hQp://goo.gl/5WaAg
• Cores
vs
Threads
-‐
hQp://goo.gl/1MLFf
• Turbostat.c
-‐
hQp://goo.gl/jDUKg
• cpu_topology
-‐
hQp://goo.gl/EUDG7
• CPU
centric
benchmark
comparisons
-‐
hQp://goo.gl/nR9Yy
• SLOB
-‐
hQp://goo.gl/yKa45
• Kyle
Hailey
-‐
hQp://dbopPmizer.com/2011/07/21/oracle-‐cpu-‐Pme/
• Book:
Computer
Architecture:
A
QuanPtaPve
Approach
5th
Ed
-‐
Chapter1
SecPon1.10
Pupng
it
all
together
Perf,
Price,
Power
hQp://goo.gl/MXigAQ
• The
mindmap
of
this
presentaPon
-‐
hQp://goo.gl/XeY0e
www.enkitec.com
42
karl.arao@enkitec.com