Parallel Processing Factor (Environment setting)

Tools that honor the Parallel Processing Factor environment will divide and perform operations across multiple processes.

Many modern computers include multicore CPUs. Spreading a geoprocessing operation across multiple processes can speed up performance by using more than one core. The performance benefit of parallel processing varies from tool to tool.

Usage notes

Note:

Individual tools may modify how this environment is used. See the tool documentation for any information that supersedes the information below.

  • The value of this environment determines the number of logical processes across which a tool spreads its operation. Those logical processes will be divided between hardware cores built into the machine. The number of hardware cores does not change based on this setting.
  • Each tool that honors this environment has a built-in default for the number of logical processes for a particular machine. You can change this based on your data, operation, and available resources.
  • If you specify a percent value (using the % symbol), the number of processes used will be the specified percentage of the number of cores on the machine, rounded to the nearest integer. For example, on a 4-core machine, setting 50% means the operation will be spread over 2 processes (50% * 4 = 2), setting 66% means the operation will be spread over 3 processes (66% * 4 = 2.64, which rounds to 3), and setting 100% means the operation will be spread over all 4 processes (100% * 4 = 4).
  • There are limitations when performing geoprocessing using an SQL Server Express database.

    SQL Server Express allows a maximum of three connections at a time. Each processing CPU requires a connection to the server. Additionally, the software running the tool, such as ArcGIS Desktop, counts as one connection process, leaving only two worker connection processes available for parallel processing.

  • Specifying more processes than your machine has cores may incur a performance penalty. This is because multiple processes will compete for resources on one core. To specify the environment in a way that avoids this competition, you can use either a percent value less than 100% or a number of processes less than the number of cores on your machine.

Dialog syntax

Parallel Processing Factor—The number of processes across which a tool will spread its operation.

  • blank (empty)—Each tool will determine how many processes to use. This is the default.
  • 0—Do not spread operations across multiple processes.
  • n—Use the specified number of processes. This value is limited to the number of processing units on the machine. If you specify a value greater than the number of cores available on your machine, the number of parallel processing instances will be limited to the number of cores available on your machine.
  • n%—Calculate the number of processes using the specified percentage: Number of processes = number of system cores * n / 100.

Scripting syntax

arcpy.env.parallelProcessingFactor = string

ParameterExplanation

empty string (blank)

Let each tool determine how many processes to use. This is the default.

0

Do not spread operations across multiple processes.

n

Use the specified number of processes.

n%

Calculate the number of processes using the specified percentage: Number of processes = number of system cores * n / 100.

parallelProcessingFactor syntax

Script example

import arcpy

# Use half of the cores on the machine
arcpy.env.parallelProcessingFactor = "50%"