View
10
Download
0
Category
Preview:
Citation preview
1
2
<Insert Picture Here>
S316823 Enterprise-Class Online Transaction Processing (OLTP) on
Exadata Mahesh Subramaniam - Senior Principal Product Manager, Oracle
Michael Nowak - Consulting Member of Technical Staff, Oracle
Manohar Reddy – IT Manager, Sogeti
3
<Insert Picture Here>
Agenda
Introduction
Best Practices
Sogeti
Q&A
4
Introduction
5Copyright © 2010, Oracle Corporation and/or its affiliates – 5 –
• Best Machine for Data Warehousing
• Best Machine for OLTP
• Best Machine for Database Consolidation
• Unique Architecture Makes it
• Fastest, Lowest Cost
Exadata Database MachineBest Platform to Run the Oracle Database
6
Exadata Hardware Architecture
Database Grid Intelligent Storage Grid
InfiniBand Network
• Redundant 40Gb/s switches
• Unified server & storage
network
• 14 High-performance low-cost
storage servers• 8 Dual-processor x64
database servers
OR
• 2 Eight-processor x64
database servers
Scaleable Grid of industry standard servers for Compute and Storage
• Eliminates long-standing tradeoff between Scalability, Availability, Cost
•100 TB High Speed disk, or
336 TB High Capacity disk
•5.3 TB PCI Flash
•Data mirrored across
storage servers
Copyright © 2010, Oracle Corporation and/or its affiliates – 6 –
7
Hybrid Columnar
CompressionIntelligent
Storage Grid
Smart Flash
Cache
Copyright © 2010, Oracle Corporation and/or its affiliates – 7 –
Exadata Storage Software Unique Features
8
Best Practices
9
OLTP Best Practices
“OLTP”
Most systems are a hybrid
Think “Response Time Focused”
Best Practices
Many are already preconfigured for you
Seeing is believing
Watch for Best Practices in Action
10
OLTP Best Practices using Oracle Database MachineGeneric Best Practices
[oracle@dbnode1]$ which sqlplus
/u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus
You know this stuff!
Top two generic Best Practices
SQL Tuning
Understand explain plans
Generate statistics
Use bind variables
Connection Architecture
Limiting connections with pools
Avoiding excessive logon/logoff
11
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache
Use Exadata smart flash cache for great IO
performance
create flashcache all
As always, cache does need a warm up
Humans are still smarter than computers so there are
exceptions
Cache attributes lets you tell Oracle about corner cases.
Place objects in appropriate cache based on size
12
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache - Best Practices in Action
Confirming proper smart flash cache config$ dcli -g $HOME/cell_group "cellcli -e 'list flashcache detail' | grep
effectiveCacheSize“
cel01: effectiveCacheSize: 365.25G
cel02: effectiveCacheSize: 365.25G
cel03: effectiveCacheSize: 365.25G
cel04: effectiveCacheSize: 365.25G
cel05: effectiveCacheSize: 365.25G
cel06: effectiveCacheSize: 365.25G
cel07: effectiveCacheSize: 365.25G
cel08: effectiveCacheSize: 365.25G
cel09: effectiveCacheSize: 365.25G
cel10: effectiveCacheSize: 365.25G
cel11: effectiveCacheSize: 365.25G
cel12: effectiveCacheSize: 365.25G
cel13: effectiveCacheSize: 365.25G
cel14: effectiveCacheSize: 365.25G
13
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache - Best Practices in Action
Lets look at a real example – a classic response time
query with index access.
Pseudo code1. Collect v$session_event.time_waited_micro
2. Run simple query
select customer_id,order_total from orders where
ORDER_ID=754724719;
3. Collect v$session_event.time_waited_micro and report
diff
The single row lookup in this example is the
foundation for many SQL statements that run on
Oracle OLTP systems
Nothing special done to store objects in flash cache
14
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache - Best Practices in Action
set serveroutput on
declare
r1 number;
r2 number;
cust_id number;
ord_tot number;
delta_ms number;
begin
select sum(TIME_WAITED_MICRO) into r1 from v$session_event where event='cell single block physical read'
and sid = (select distinct sid from v$mystat);
select customer_id,order_total into cust_id,ord_tot from soe.orders where ORDER_ID=754724719;
select sum(TIME_WAITED_MICRO) into r2 from v$session_event where event='cell single block physical read'
and sid = (select distinct sid from v$mystat);
delta_ms:=r2-r1;
dbms_output.put_line('Milliseconds waiting on IO: '||delta_ms/1000);
end;
/
---------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
---------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 19 | 3 (0)| 00:00:01 | | |
| 1 | PARTITION HASH SINGLE | | 1 | 19 | 3 (0)| 00:00:01 | 11 | 11 |
| 2 | TABLE ACCESS BY LOCAL INDEX ROWID| ORDERS | 1 | 19 | 3 (0)| 00:00:01 | 11 | 11 |
|* 3 | INDEX UNIQUE SCAN | ORDER_PK | 1 | | 2 (0)| 00:00:01 | 11 | 11 |
---------------------------------------------------------------------------------------------------------------
15
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache - Best Practices in Action
Results:
Buffer cache
Average milliseconds per IO: 0
No Flash cache (this is like traditional storage)
Average milliseconds per IO : 8
Exadata Smart Flash Cache
Average milliseconds per IO : <1
~88% decrease in average IO time with Exadata
Smart Flash Cache
16
OLTP Best Practices using Oracle Database MachineUse Exadata Smart Flash Cache - Best Practices in Action
AWR excerpt from Sogeti production EBS system
Top 5 Timed Foreground Events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
DB CPU 1,108 79.3
cell single block physical read 326,056 192 1 13.7 User I/O
log file switch (checkpoint in 50 28 565 2.0 Configurat
library cache pin 68,915 14 0 1.0 Concurrenc
cursor: pin S wait on X 1 12 12265 .9 Concurrenc
17
OLTP Best Practices using Oracle Database Machine Leverage the speedy Infiniband network
Low latency = fast communication
RDS bcopy (db->db) and zcopy (db->cell)
You like this alert.log message:
Cluster communication is configured to use the following interface(s)
for this instance 192.168.20.21 cluster interconnect IPC
version:Oracle RDS/IP (generic)
Interface configuration, network configuration, etc all
preconfigured for performance and HA
Extending the IB fabric with IPoIB with no application
changes
Media servers, batch servers
18
OLTP Best Practices using Oracle Database Machine Leverage the speedy Infiniband network Best Practices in Action
tsks tx/s tx+rx K/s rw+rr K/s tx us/c rtt us cpu %
1 17882 571659.77 0.00 3.97 53.39 -1.00
1 18343 586384.71 0.00 3.77 52.01 -1.00
1 18701 597786.30 0.00 3.76 50.96 -1.00
1 18635 595732.18 0.00 3.78 51.14 -1.00
Example Rds-stress bcopy output
19
OLTP Best Practices using Oracle Database Machine Leverage the speedy Infiniband network Best Practices in Action
Global Cache and Enqueue Services - Workload Characteristics
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg global enqueue get time (ms): 0.1
Avg global cache cr block receive time (ms): 0.3
Avg global cache current block receive time (ms): 0.2
Avg global cache cr block build time (ms): 0.0
Avg global cache cr block send time (ms): 0.0
Avg global cache current block pin time (ms): 0.1
Avg global cache current block send time (ms): 0.0
AWR excerpt from Sogeti production EBS
20
OLTP Best Practices using Oracle Database Machine Check your scan IQ
Some facts about scans:Scans exists in “OLTP” systems
Exadata smart scan requires a direct path read.
A direct path read is chosen at runtime based on internal heuristics
The STORAGE clause in an explain plan doesn‟t necessarily mean you
will perform a smart scan.
The buffer caching in certain “OLTP” environments can
occasionally induce conventional reads when smart
scan is faster.
Typically see cell multiblock physical read instead of cell
smart table scan waits
No one-size-fits-all solution can be given here but it is
very fixable.
21
OLTP Best Practices using Oracle Database Machine Understand Storage Index
Cell maintains min/max value on cell storage regions
IO automatically eliminated during smart scan via an
internal index on storage regions. You don‟t need to
do anything to get this feature!
Loading data in sorted order further enhances the
benefit of storage index
Statistics available to assess storage index. Check
out v$sysstat where name like „%storage index%‟
22
OLTP Best Practices using Oracle Database Machine Understand Storage Index - Best Practices in Action
Lets look at a reporting query with a full table scan
against 310G compressed table with and without
storage index
Pseudo code:1. Collect v$session_event.time_waited_micro ,
v$sysstat.name (storage index stats)
2. Run simple query
select promo_id from sales where
cust_id=23556 and amount_sold > 90;
3. Collect v$session_event.time_waited_micro ,
v$sysstat.name (storage index stats) and
report diff
No special data sorting for this example
23
OLTP Best Practices using Oracle Database Machine Understand Storage Index - Best Practices in Action
set serveroutput on
declare
r1 number;
r2 number;
pr_id number;
sid1 number;
sid2 number;
delta_ms number;
delta_sid number;
begin
select sum(TIME_WAITED_MICRO) into r1 from v$session_event where event='cell smart table scan'
and sid = (select distinct sid from v$mystat);
select m.value into sid1 from v$mystat m, v$sysstat s where m.statistic#=s.statistic# and s.name =
'cell physical IO bytes saved by storage index';
select promo_id into pr_id from sh.sales where cust_id=23556 and amount_sold > 90;
select sum(TIME_WAITED_MICRO) into r2 from v$session_event where event='cell smart table scan'
and sid = (select distinct sid from v$mystat);
select m.value into sid2 from v$mystat m, v$sysstat s where m.statistic#=s.statistic# and s.name =
'cell physical IO bytes saved by storage index';
delta_ms:=r2-r1;
delta_sid:=sid2-sid1;
dbms_output.put_line('Milliseconds waiting on IO: '||delta_ms/1000);
dbms_output.put_line('Storage Index bytes saved: '||delta_sid);
end;
/
24
OLTP Best Practices using Oracle Database Machine Understand Storage Index - Best Practices in Action
Results:
No Storage Index (still getting Exadata benefits)
Total seconds spent doing IO : 32
Total GB saved with storage index: 0
Exadata Storage Index
Total seconds spent doing IO : 18
Total GB saved with storage index: 148
44% of IO eliminated with Exadata storage index
Bonus question: how many seconds were spent
performing IO if smart scan was disabled?
Answer: It‟s a trick question; You should never disable
smart scan
25
OLTP Best Practices using Oracle Database Machine Preconfigured Database and Schema Configuration Best Practices
Don‟t throw out that database we gave you at
deployment time! It has valuable best practices built in:
Database GRID via Oracle Clusterware Services
Storage GRID via Automatic Storage Management
8k default block size for database
Memory Management
Conservative OLTP starting point: 16G sga_target, 8G
pga_aggregate_target
26
OLTP Best Practices using Oracle Database Machine Up-to-you Application and System Specific Best Practices
CPU and IO Resource Management including setting
of hard limits
Operating System Hugepages can improve OS
resource efficiency with large SGAs and/or many
connections
Requires proper configuration and testing
27
Customer Experience
Sogeti
28www.us.sogeti.com
Local Touch – Global Reach
About Sogeti
Consumer Products,Retail & Distribution
Four Capgemini Divisions Across 6 Sectors
Consulting Services (Capgemini Consulting):
helping our clients identify, structure and execute transformation projects that will have lasting effects on their growth and competitiveness.
Technology Services (TS):
designing, developing and implementing packaged-based ERP solutions such as SAP and Oracle for systems integration and global IT roll outs.
Outsourcing Services (OS):
Assisting our clients in the total or partial outsourcing of their IT systems.
Local Professional Services (Sogeti):
Supplying IT projected-based services that are suited to local needs (Microsoft, IBM, Oracle Technologies, business intelligence, testing, application development) while also leveraging Global Delivery.
Sogeti is one of four professional disciplines
of expertise. These services range from
strategy development to IT systems
maintenance. By combining its skills, The
Group‟s four main professional disciplines
offer Capgemini‟s clients integrated
transformation services.
The Group also combines its areas of
expertise to offer specific solutions across six
sectors.
Manufacturing
Telecom, Media & Entertainment
Financial Services
Public Sector
Energy, Utilities & Chemicals
Loca
l P
rofe
ssio
na
l S
erv
ice
s
Ou
tso
urc
ing
Se
rvic
es
Te
chn
olo
gy S
erv
ice
s
Co
nsu
ltin
g S
erv
ice
s
29www.us.sogeti.com
Local Touch – Global Reach
High Level Scenario
Sogeti uses Oracle e-Business Suite to support its end-to-end business processes,
including financials, human resources, project resource management, and project
accounting.
Key statistics:
• Existing Application: EBS 11.5.10.2
• Existing Database: 10gR2, Solaris 10 SPARC
• Number of users: 3000
• Modules Implemented:• Financials (Accounts Payable, Accounts Receivable, General Ledger, Purchasing)
• Human Resources
• Project Accounting (Project Resource Management, iExpenses, Time & Labor)
• Fixed Assets
• Other Applications (outside of EBS): Several legacy applications, CRM, and Payroll
Challenge:
• A small IT team trying to meet the fast growing need of data
• A significant amount of time spent fighting fires, running ad-hoc queries against
large data sets and optimize queries which have short shelf life
• Time lost due to performance issues with ad-hoc queries & reports
30www.us.sogeti.com
Local Touch – Global Reach
The Goals
Based on anticipated savings and additional benefits, we decided to migrate our EBS 11.5.10.2
environment to Oracle Database Machine. Oracle Exadata is helping us:
Improve Consolidation
• Reduce number of
instances by
aggregating all Oracle
database instances into
a single instance
• Reduce effort needed to
administer & optimize
databases
• Reduce weekly tape
backup from 4 hours to
daily 4 minutes
Reduce Overall Costs/
Increase Productivity
• Reduce number of
servers and simplify
software licensing
resulting in meaningful
cost savings
• Reduced dependence
on IT staff
• Higher availability
resulting in significant
productivity
enhancements
• Better performance
resulting in additional
productivity
Enhance Reporting
• Eliminate batch
processing for 20-25
nightly and weekly
custom reports/ batch
jobs
• Provide real-time
reporting for critical key
performance indicators
• Create a high-
performing platform for
subsequent BI/ DW
implementation
31www.us.sogeti.com
Local Touch – Global Reach
The Plan
May 2010 June 2010 July 2010 August 2010
Perform Technical Testing
Go-Live
Perform UAT Testing
Conduct Initial Migration to Linux ASM/single instance .
Conduct Final Migration to Linux ASM/RAC
Kickoff and Information Gathering/Analysis
Perform Technical Testing
32
Upcoming Exadata SessionsWednesday, September 22
1:00 pm – 2:00 pmOracle Exadata Tips, Tricks, and Best Practices: Backup and Recovery (S316821)
Moscone South, Room 307
4:45 pm – 5:45 pmOracle Exadata Tips, Tricks, and Best Practices: Migrating to the Oracle Exadata (S316822)
Moscone South, Room 307
33
Upcoming Exadata SessionsThursday, September 23
12:00 pm – 1:00 pmOracle Exadata Technical Deep Dive: Architecture and Internals (S316820)
Moscone South, Room 103
3:00 pm – 4:00 pmThe X-Files: Managing the Oracle Exadata and Highly Available Oracle Databases (S316974)
Moscone South, Room 102
34
35
The preceding is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle‟s
products remains at the sole discretion of Oracle.
Recommended