Calculating Parameter Values for Parallelism

I did get some questions on some of the default parameter settings/values for parallel_servers_target and parallel_max_servers. While these are being addressed in the documentation, I figured I should just list them here and create a reference now, rather than wait for a doc library update.

All of the below are on a per instance basis, and should be aggregated for a cluster.

Parallel_servers_target

The default value is calculated as follows:

cpu_count (hyperthreading is relevant here!) * parallel_threads_per_cpu * <concurrent users> * 2

The number of concurrent users running at default DOP on an instance is dependent on the memory management setting. If automatic memory management is disabled (manual mode) then the number of parallel users is 1. If PGA automatic memory management is enabled, the number of users is 2. If global memory management or SGA memory target is used in addition to PGA automatic memory management, then the number of supported concurrent users is 4.

To summarize:
1) If memory_target or sga_target is written in pfile or spfile,
    <concurrent users>=4
2) Else if pga_aggregate_target is written in pfile or spfile,
    <concurrent users>=2
3) Else <concurrent users>=1

On an Exadata X2-2 system this comes to the following for a single instance with the latest Oracle best practices in place:

(2 CPUs * 6 Cores * 2 (for hyperthreading)) * 1 (different from the default) * (we set SGA target: 4) * 2 = 192

Parallel_max_servers

This parameter is dependent on a number of things, which can be summarized in the following formula for its default value:

cpu_count (hyperthreading is relevant here!) * parallel_threads_per_cpu * <concurrent users> * 5

The same logic for <concurrent users> applies here and this leads to a default on Exadata X2-2 of:

(2 CPUs * 6 Cores * 2 (for hyperthreading)) * 1 (different from the default) * (we set SGA target: 4) * 5 = 480

Relationship Matters

You will notice that parallel_servers_target is certainly lower than parallel_max_servers. That should always be the case on your system! The system should start to queue parallel statements (note: only available with parallel_degree_policy = Auto) well before they fall of the cliff of running out of processes available for parallel statements.

With respect to whether parallel_servers_target is appropriate for your system, do read the posts on concurrency and how to assess how many concurrent statements can run on your system.

Comments:

Post a Comment:
Comments are closed for this entry.
About

The data warehouse insider is written by the Oracle product management team and sheds lights on all thing data warehousing and big data.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today