Parallel processing for submits, syncs, and shelves
Parallel processing of submits, syncs, and shelves might aid performance for:
-
High-latency networks.
-
Network configurations that prevent a single TCP flow from making full use of available bandwidth.
-
Situations where the server transmits large compressed binary files to a multi-core client machine that uses parallel processing to uncompress the files.
To learn more, see Parallel checkpointing, dumping, and recovery.
The links that follow in this topic go to Helix Core Command-Line (P4) Reference.
The net.parallel.max
configurable specifies the maximum number of concurrent threads for p4 submit
, p4 sync
, and p4 shelve
Submit
To enable Parallel submits, specify the --parallel
option of the p4 submit
command.
To enable automatic parallel submits, set the
configurable to the number of
threads for sending files in parallel for each submit. net.parallel.submit.threads
Sync
To transfer files using multiple threads, specify the --parallel
option of the
command.p4 sync
To enable automatic parallel sync, set the net.parallel.threads
configurable on the server to a value greater than 1
, but less than or equal to the value of the
configurable.net.parallel.max
To reduce lock contention during parallel syncs, set the client.sendq.dir
configurable.
To reduce the number of parallel transmit threads for sync commands when the total number of concurrent user-transmit threads from all commands, including submit, would exceed the value you specify:
-
Set the net.parallel.sync.svrthreads configurable.
-
Set the monitor configurable to
1
or greater.
See Parallel processing for the p4 sync
command.
Shelves
To enable automatic parallel shelving, set the net.parallel.shelve.threads configurable to a value that is greater than 1
and less than or equal to the value of the
configurable. net.parallel.max
Optionally, set the:
-
net.parallel.shelve.min configurable to change the minimum number of files in a parallel shelve, which, by default, is
9
-
net.parallel.shelve.batch configurable to change the number of files in a batch for parallel shelving, which, by default, is
8
To disable automatic parallel shelving, unset the net.parallel.shelve.threads configurable.
Parallel processing in a commit-edge environment
Parallel submits can take place from an Edge Server to a Commit Server and the Commit Server can use standard pull threads to transfer the files. To enable this feature, the administrator makes sure that:
-
The Commit Server has a service user (see Types of users) that is logged in to the Edge Server.
-
The tickets file of the service user is available to the Commit Server.
-
The Edge Server external address is configured in its server spec. See the
p4 server
command.
-
If SSL is being used by the Edge Server, a trust is be set up between the commit and Edge Server, and the
P4TRUST
file is available to the Commit Server. See thep4 trust
command.
Shelving
Promoted shelves require an additional file transfer from the Edge Server to the Commit Server. Parallel pull threads for this transfer require that the ExternalAddress field be set in the Edge Server spec and that pull threads can be used on the Commit Server. (This transfer using pull threads is not supported on Windows platforms.)
A user can override the shelve configurables on the command line or disable parallel shelving with the p4 shelve --parallel=0 command.
p4 monitor show and replica
The output from p4 monitor show
for parallel sync, submit, or shelve commands issued to a forwarding replica include the associated transmit processes only on the master server. Those transmit processes are not seen on a replica unless the -p
option is used for a parallel sync command.