Beruflich Dokumente
Kultur Dokumente
Presented by
Joel Goodman
Oracle University EMEA
Topics
Automatic Parallelism
Parallel Statement Queuing
In Memory Parallel Query
No I/O statistics:
PARALLEL_DEGREE_LIMIT=
CPU | IO | value
16
7
32
64
128
DOP
PARALLEL_MIN_TIME_THRESHOLD
Controls which statements are candidates for parallelism
Default is AUTO, by default set to 10 seconds
PARALLEL_DEGREE_LIMIT
Controls maximum DOP per statement
Set to CPU, by default meaning DEFAULT DOP
Allowable Values
Default
PARALLEL_DEGREE_POLICY
MANUAL
PARALLEL_MIN_TIME_THRESHOLD
AUTO
PARALLEL_DEGREE_LIMIT
CPU
PARALLEL_DEGREE_POLICY
MANUAL
DBA manually specify all aspects of parallelism
There are no new features enabled
LIMITED
Auto DOP restricted to queries on tables decorated with
DEFAULT PARALLEL clause
No Statement Queuing or In-Memory Parallel Execution
AUTO
PARALLEL_DEGREE_LIMIT
DBA caps the maximum DOP for ANY statement
Prevents Auto DOP reaching high levels of DOP
Defaults to CPU which uses Default DOP:
PARALLEL_THREADS_PER_CPU * CPU_COUNT * # instances
10
11
12
/*+ PARALLEL
*/
/*+ PARALLEL(AUTO)
*/
/*+ PARALLEL(MANUAL)
*/
/*+ PARALLEL(4)
*/
/*+ NO_PARALLEL
*/
13
Example 1
PARALLEL_DEGREE_POLICY is set to AUTO
SQL> CREATE TABLE sales (c1 number, c2, date ) PARALLEL 64;
SQL> SELECT
sum(amount_sold)
2 FROM
sales GROUP BY prod_id;
14
Example 2
PARALLEL_DEGREE_POLICY is set to LIMITED
SQL> CREATE TABLE sales (c1 number, c2, date ) PARALLEL 8;
SQL> SELECT
sum(amount_sold)
2 FROM
sales GROUP BY customer_id;
15
Example 3
PARALLEL_DEGREE_POLICY is set to LIMITED
PARALLEL_DEGREE_LIMIT is set to CPU
SQL> CREATE TABLE sales (c1 number, c2, date ) PARALLEL;
SQL> SELECT
sum(amount_sold)
2 FROM
sales GROUP BY customer_id;
16
No statement queuing
18
19
20
If not enough PX
servers available,
queues the statement
DOP is automatically
determined
64
32
64
16
32
128
16
FIFO Queue
If enough PX
servers available,
executes
immediately
8
128
21
22
Default value:
4 * PARALLEL_THREADS_PER_CPU * CPU_COUNT *
ACTIVE_INSTANCE_COUNT
23
PARALLEL_MAX_SERVERS
PARALLEL_SERVERS_TARGET
64
8
CPU_COUNT
On an 8 CPU system
PARALLEL_DEGREE_POLICY = AUTO
24
192
PARALLEL_MAX_SERVERS
Queuing Starts
PARALLEL_SERVERS_TARGET
128
25
16
32
128 / 16 = 8
128 / 32 = 4
PARALLEL_DEGREE_LIMIT
s.sql_id, s.sql_text
V$SQL_MONITOR m, V$SQL s
m.status = 'QUEUED'
m.sql_id = s.sql_id;
26
Static
Reports
Tactical
Queries
32
16
128
DB
Static
Reports
32
32
16
Tactical
Queries
32
16
32
Ad-hoc
Workloa
d
16
16
128
DB
MGMT_P1=20%
65%
15%
15%
30
20%
65%
De-Queue from
this consumer
group
20%
31
RT_ANALYTIC
group
32
32
16
SALES Service
mapped to group
DB
SALES
ADMIN
RT_CRITICAL
group
32
32
ADMIN Service
mapped to group
32
Default Value
PARALLEL_DEGREE_LIMIT
CPU
PARALLEL_DEGREE_POLICY
PARALLEL_MIN_TIME_THRESHOLD
PARALLEL_SERVERS_TARGET
33
MANUAL
AUTO
CPU_COUNT*
PARALLEL_THREADS_
PER_CPU *
concurrent_parallel_users
*2
Description
Max DOP that can be
granted with Auto DOP
Specifies if Auto DOP,
Queuing, & In-memory PE
are enabled
Specifies min execution
time a statement should
have before AUTO DOP
will kick in
Specifies # of parallel
processes allowed to run
parallel statements before
statement queuing is used
34
Evolution
Growing imbalance between IO bandwidth and Memory
Extremely large memory capacity on typical database
servers
36
37
Possible workarounds:
Compression
Partitioning
38
39
40
Table is
extremely small
Table is
extremely Large
41
42
Enhance In-Memory PX
Using Server Pools
43
Enhance In-Memory PX
Increase the number of nodes (in a server pool)
Query performance = 10 times faster than conventional
Direct Read PX
Increase the size of the whole aggregated database cache
44
In-Memory PX [3node]
EXPERT SUMMIT
November 5th. 7th. 2014
45
Oracle Confidential
Internal