Configurables

The following table lists all the configurables you can use to customize a Perforce service. Configurable settings might affect the server, the client, or a proxy. The target of a particular configurable is indicated in the table below. The next sections explain how you set configurables, depending on their target.

Where a configurable refers to a number of bytes, "K" and "M" abbreviations are interpreted as the appropriate powers of two. For other configurables, "K" and "M" refer to 1,000 and 1,000,000.

Configurables that affect the server

Use the p4 configure to set or unset configurables that affect a Perforce server. These configurables are also described in p4 help configurables. For more information on the options you have in setting server configurables and on order of precedence, see the description of p4 configure.

Changes to most configurables are immediate; you do not have to restart the server for the change to take effect.

Configurables that affect the client

You can set configurables that affect the client in the following ways (shown in order of precedence):

  • As command line global options that are passed at server startup. For example:

    p4 -u bluto -p perforce:1666 sync
    
  • As entries in a P4CONFIG file. Set configurables like this:

    P4USER=bluto
    P4PORT=perforce:1666
    

    The following configurables can be set in a config file; you can also set the variables listed for the p4 help environment command:

    filesys.binaryscan
    net.maxwait
    filesys.bufsize
    net.net.rfc3483
    lbr.verify.out
    net.tcpsize
    net.keepalive.count
    sys.rename.max
    net.keepalive.disable
    sys.rename.wait
    net.keepalive.idle
    net.keepalive.interval
  • As entries in a P4ENVIRO file.

    You can use both P4ENVIRO and P4CONFIG files to define environment variables: use the P4CONFIG file for those variables that have different values for different workspaces and the P4ENVIRO file for those variables that remain constant for all projects. Values set in a P4CONFIG file override those set in a P4ENVIRO file.

  • As set by the p4 set command for Windows and OS X. For example:

    p4 set P4PORT=ssl:tea:1666
    

Configurables that affect the proxy

You can set configurables that affect the proxy in the following ways:

  • Using a command line option. For example:

    p4p -p tcp64:[::]:1999 -t central:1666 -r /var/proxyroot -v proxy.monitor.level=2
    
  • Using environment variables.

  • On Windows, using the p4 set command as follows:

    p4 set -S "perforce_proxy" P4POPTIONS="-v myconfig=myvalue"
    

Configurables

Configurable

Client or Server or Proxy?

Default Value

Meaning

auth.default.method

Server

perforce

The default method to use for identifying for new users.

  • perforce specifies that the user is to be authenticated using Perforce's db.user table. This is the default setting.

    If there are no active LDAP configurations, this setting might cause a new user to be authenticated against an AD/LDAP server, using an authentication trigger if such a trigger exists.

  • ldap specifies the user be authenticated in against an AD/LDAP server without having to use authentication triggers.

    In addition, if you want new users to be automatically created when they have successfully authenticated against an AD/LDAP server, set the configurable auth.ldap.userautocreate to a non-zero value.

auth.ldap.userautocreate

Server

0

If auth.default.method is set to ldap, a value of 1 for this configurable will cause users to be auto-created when they log in to Perforce and they have been successfully authenticated against an AD/LDAP server using p4 login.

auth.ldap.cafile

Server

none

The path to a file that contains one or more PEM-formatted certificates used to verify the certificate presented by the AD/LDAP server when using SSL or TLS and auth.ldap.ssllevel is >=1.

auth.ldap.order.n

Server

none

Specifies the name of the LDAP configuration to use for authentication and the order in which it should be used to search for a given user name. The lowest number confers the highest priority.

You may skip numbers. For example:

auth.ldap.order.1=UK_LDAP
auth.ldap.order.2=US_LDAP
auth.ldap.order.5=RU_LDAP

If this configurable has been set, if it specifies an existing LDAP configuration, if LDAP authentication is enabled, and if the Perforce server is restarted, authentication trigger support is disabled.

auth.ldap.ssllevel

Server

0

Level of SSL certificate validation:

  • 0: No validation; default.

  • 1: Certificate must be valid, but the common name is not checked.

  • 2: Certificate must be valid and the certificate common name matches the AD/LDAP server's host name.

auth.ldap.timeout

Server

30

The time in seconds to wait before giving up on a connection attempt.

cluster.id

Server

none

The name of a Perforce cluster, specified when the cluster is created.

db.peeking

Server

2

Enable and configure lockless reads; when enabled, many common commands no longer block other commands attempting to update the database. See the Perforce Server Administrator's Guide: Fundamentals for details.

0: Disable peeking. Behavior is identical to 2013.2 and earlier.

1: New locking order is enabled, peeking is disabled, (diagnostic use only).

2: New locking order is enabled, peeking is enabled, hx/dx optimization on.

3: New locking order is enabled, peeking is enabled, hx/dx optimization is off.

db.replication

Server

unset

Control behavior of commands that access metadata (db.* files) on the Perforce server:

readonly: User commands that read metadata are accepted; commands that modify metadata are rejected.

Equivalent to starting a replica with the p4d -M readonly option.

dbjournal.bufsize

Server

16K

Buffer size for journal and checkpoint read/write operations.

dbopen.nofsync

Server

0

Set to 1 to disable fsync() call when server closes a db.* database file, and permit the OS to determine when to write the modified data.

defaultChangeType

Server

none

Default type for new changelists: either public or restricted. If unset, new changelists are public.

dm.annotate.maxsize

Server

10M

Maximum revision size for p4 annotate.

dm.domain.accessforce

Server

3600

Wait this many seconds before forcibly updating an access time, even if server must wait for a lock.

dm.domain.accessupdate

Server

300

Wait this many seconds before requesting a write lock to update an access time.

dm.grep.maxrevs

Server

10K

Maximum number of revisions that can be searched with p4 grep.

dm.integ.engine

Server

3

By default, use new integration engine with p4 integrate. (The p4 merge command always uses the v3 integration engine regardless of this setting.)

Sites that wish to continue to use the old (2006.1) integration logic must set this configurable to 2 by running p4 configure set dm.integ.engine=2.

dm.keys.hide

Server

0

If set to 1 or 2, p4 keys requires admin access. If set to 2, p4 key requires admin access.

dm.password.minlength

Server

8

Default minimum password length for servers where security is set to a nonzero value.

dm.protects.allow.admin

Server

0

Allow Perforce administrators to use -a, -g, and -u with p4 protects. By default, only superusers can use these options.

dm.proxy.protects

Server

1

Determine (in accord with the use of IP addresses in the protections table) whether a user can access a server from a given IP address. By default, if a connection comes through an intermediary, the proxy- prefix is prepended to the client IP address.

Set this variable to 0 if you do not want to have connections that come in through an intermediary to have the proxy- prefix.

For more information, see the p4 protect command.

dm.resolve.attribs

Server

1

Enable resolve for attributes set with p4 attribute.

dm.rotatewithinjnl

Server

1

Set to 0 to disable log rotation after journal rotation.

By default, when the journal is rotated, any structured logs are also rotated. Disabling this behavior can help when you're doing frequent journal rotations and you want the log rotated on a different schedule.

dm.shelve.maxfiles

Server

10M

Maximum number of files that can be shelved with p4 shelve.

dm.shelve.maxsize

Server

0

Maximum size of a file that can be shelved, or 0 for unlimited.

dm.shelve.promote

Server

0

Enable to make edge servers always promote shelved files to the commit server (rather than use the -p option). Generally, it is a bad idea to enable automatic promotion because it causes a lot of unnecessary file transfers for shelved files that are not meant to be shared.

dm.user.accessforce

Server

3600

Wait this many seconds before forcibly updating an access time, even if server must wait for a lock.

dm.user.accessupdate

Server

300

Wait this many seconds before requesting a write lock to update an access time.

dm.user.loginattempts

Server

3

Number of password attempts before delay. After the third failed login attempt, the user must wait 10 seconds.

dm.user.noautocreate

Server

0

Control behavior of automatic user creation.

0: Create users as required. When executed by a nonexistent user, most Perforce commands cause a user to be created. An example of a command that does not create a user is p4 info.

1: New users may only be created by running p4 user.

2: New users may only be created by superusers running p4 user.

dm.user.resetpassword

Server

0

If set, all new users created with a password are forced to reset their password before issuing any commands.

This configurable applies only if the passwords for newly created users are set using the Password: field of the user specification. The password reset behavior for new users that get initial passwords using the p4 passwd command after the user is created is not affected by the setting of this configurable.

filesys.binaryscan

Client

64K

Scan the first filesys.binaryscan bytes for binary data when running p4 add.

filesys.bufsize

Client, Server

4K

Buffer size for client-side read/write operations.

filesys.depot.min

Server

250M

Minimum diskspace required for any depot before server rejects commands. (If there is less than filesys.depot.min diskspace available for any one depot, commands are rejected for transactions involving all depots.)

filesys.extendlowmark

Client

32K

Minimum filesize before preallocation (Windows).

filesys.P4JOURNAL.min

Server

250M

Minimum diskspace required on server journal filesystem before server rejects commands.

filesys.P4LOG.min

Server

250M

Minimum diskspace required on server log filesystem before server rejects commands.

filesys.P4ROOT.min

Server

250M

Minimum diskspace required on server root filesystem before server rejects commands.

filesys.TEMP.min

Server

250M

Minimum diskspace required for temporary operations before server rejects commands.

filesys.windows.lfn

Server

unset

Set to 1 to support filenames longer than 260 characters on Windows platforms.

filetype.maxtextsize

Client

10M

Maximum file size for text type detection.

journalPrefix

Server

unset

Prefix or directory location for journal.

lbr.autocompress

Server

0

Enabling this configurable, specifies the storage method as compressed text (ctext) rather than RCS format text. The user still sees the file type as text.

It's a good idea to set this variable when using a commit/edge configuration or when sharing archive files between servers as happens in a Perforce cluster environment.

lbr.bufsize

Server, Proxy

4K

Buffer size for read/write operations to server's archive of versioned files.

lbr.proxy.case

Proxy

1

1: File paths are always case-insensitive.

2: File paths are case-insensitive if server is case-insensitive.

3: File paths are always case-sensitive.

lbr.replication

Server

unset

Control behavior of user commands that access versioned files on the Perforce server:

readonly: User commands that read depot files are accepted; user commands that modify files are rejected.

shared: This is a synonym for ondemand mode.

ondemand: Replicate versioned files if, and only if, explicitly requested by users of the replica server.

cache: Commands that reference file content are accepted, but do not automatically transfer files.

none: No access to versioned files is permitted.

Equivalent to starting a replica p4d process with one of the -D readonly, -D shared, (or -D ondemand), -D cache, or -D none options.

lbr.retry.max

Server

50K

In the event of a failed transfer, a replica will make lbr.retry.max attempts to retrieve the file.

lbr.verify.in

Server

1

Verify contents from the client to server? (1 for yes, 0 for no)

lbr.verify.out

Client, Server

1

Verify contents from the server to client? (1 for yes, 0 for no)

lbr.verify.script.out

Server

1

Set to 0 to prevent files of type +X from having their digest checked when transmitted from server to client.

When source watermarking is used, sites have configured a +X archive trigger script that returns different results each time a file is sync'd or printed, in order to embed a user-specific string into the file contents during sync. This defeats the digest verification performed when sending the file to disk. Setting lbr.verify.script.out disables digest verification in this situation. Other files are still verified normally, as determined by the setting of lbr.verify.out.

minClient

Server

none

Lowest version of client software permitted to connect to this server, set by p4 configure set minClient=version.

minClientMessage

Server

none

Message to issue if client software is too old, set by p4 configure set minClientMessage=message.

monitor

Server

0

Server process monitoring:

0: Server process monitoring off.

1: Monitor active commands only.

2: Monitor both active commands and idle connections.

5: Monitor both active commands and idle connections, including a list of the files locked by the command for more than one second.

10: Monitor both active commands and idle connections, including a list of the files locked by the command for more than one second, with lock wait times included in the lock information.

25: Monitor both active commands and idle connections, including a list of the files locked by the command for any duration, with lock wait times included in the lock information.

See p4 monitor for details.

monitor.lsof

Server

none

When set on Unix platforms, enables the use of the p4 monitor command to display a list of locked files. Set to the following value:

path/lsof -F pln

The value for path varies with the version of Unix you are using. For example:

/usr/bin/lsof -F pln

For more information, see the p4 monitor command.

net.backlog

Server, Proxy

10

Maximum length of queue for pending connections. Consider increasing if users find themselves unable to connect to extremely heavily-loaded servers.

net.keepalive.count

Server

0

Number of unacknowledged keepalives before failure.

net.keepalive.disable

Server

0

If non-zero, disable the sending of TCP keepalive packets.

net.keepalive.idle

Server

0

Idle time (in seconds) before starting to send keepalives.

net.keepalive.interval

Server

0

Interval (in seconds) between sending keepalive packets.

net.maxfaultpub

Proxy

100

A value in megabytes that controls the proxy's cache faulting behavior. A single p4 sync will not publish more than net.maxfaultpub megabytes of faults into pdb.lbr.

net.maxwait

Client, Server, Proxy

none

Time, in seconds, before a network connection times out.

Best practice is not to set server-wide: if set on server, requires that users complete command-line forms within this limit. If set in user's individual P4CONFIG file, applies to user's workstation (and requires only that the versioning service reply to user requests within the allotted time limit).

net.mimcheck

Server, Proxy

1

Man-in-the-middle network security level:

0: Disable MitM checks.

1: Check proxy/broker connections in legacy contexts.

2: Connections from clients are checked for TCP forwarding.

3: Connections from clients, proxies, and brokers are checked for TCP forwarding.

4: All connections are checked; client software older than release 2010.1 cannot connect.

5: All intermediate services are checked, and all service users must have valid tickets. Requires 2010.2 server and intermediate services.

net.parallel.max

Server

0

A value greater than one enables parallel processing up to the specified level, when syncing a client or submitting files.

In addition to setting this variable, you must use the --parallel option to the p4 sync command or the p4 submit command to further describe the processing desired.

Values can range between 0 and 100. See the p4 sync command or the p4 submit command for more information.

net.reuseport

Server

0

Set SO_REUSEPORT for listening socket.

net.rfc3484

Client, Server

0

If 1, permit the operating system to determine whether IPv4 or IPv6 is used when resolving hostnames. This is applicable only if a host name (either FQDN or unqualified is used).

If an IPv4 literal address (e.g. 127.0.0.1) is used, the transport is always tcp4, and if an IPv6 literal address (e.g. ::1) is used, then the transport is always tcp6.

net.tcpsize

Client, Server, Proxy

512K

TCP send and receive buffer sizes, set on connection. Consider increasing for high-latency connections, such as the Proxy. Actual buffer size is the larger of this value and that defined by the OS.

proxy.monitor.interval

Proxy

10

Set the proxy monitoring interval. Default is 10 seconds.

proxy.monitor.level

Proxy

0

0: Monitoring disabled (default).

1: Monitor file transfers only.

2: Monitor all operations.

3: Monitor all traffic for all operations.

rcs.nofsync

Server

0

Set to 1 to disable fsync() call when server writes to a versioned file in RCS format, and permit the OS to determine when to write the modified data.

rpl.checksum.auto

Server

0

Level of database table checksum verification to perform when rotating journal. Each level corresponds to a larger set of database tables.

0: Disable checksums.

1: Verify the most important system and revision tables.

2: Verify all of level 1, plus tables that hold metadata that does not vary between replicas.

3: Verify all metadata, including metadata that is expected to vary on build-farm and edge-server replicas.

rpl.checksum.change

Server

0

Level of on-the-fly changelist verification to perform.

0: Perform no verification.

1: Write journal note at the end of a submit.

2: Replica verifies changelist summary and writes to integrity.csv if the changelist does not match.

3: Replica verifies changelist summary and writes to integrity.csv even if the changelist does match.

rpl.checksum.table

Server

0

Level of table checksumming to perform.

0: Perform table-level checksumming only.

1: Journal notes for table-unload and table-scan are processed by the replica, and are logged to integrity.csv if the check fails.

2: Results of journal note processing in the replica are logged even if the results match.

rpl.compress

Server

0

Enable replica/master network compression:

0: No data stream compression.

1: Data streams used for archive transfer to the replica (p4 pull -u) are compressed.

2: Data streams used by p4 pull -u and p4 pull are compressed.

3: All data streams (p4 pull -u, p4 pull, and data streams for commands forwarded to the master or commit server) are compressed.

rpl.forward.login

Server

0

Set to 1 on each replica to enable single-sign-on authentication for users in a distributed configuration. The cluster.id configurable must also be the same for all servers participating in a distributed configuration.

For more information, see "Authenticating users" in Perforce Server Administrator's Guide: Multi-site Deployment.

rpl.jnlwait.adjust

Server

25

Used to tune server performance when a forwarding replica has lots of users. Please consult Perforce Support for guidance in adjusting values.

rpl.jnlwait.interval

Server

50

Used to tune server performance when a forwarding replica has lots of users. Please consult Perforce Support for guidance in adjusting values.

rpl.jnlwait.max

Server

1000

Used to tune server performance when a forwarding replica has lots of users. Please consult Perforce Support for guidance in adjusting values.

rpl.journal.ack

Server

1

The number of standby servers that must acknowledge a persisted transaction before the transaction is visible to a workspace server and before the client is notified of successful completion.

The default value means one standbys has to acknowledge a transaction.

Do not set this configurable to a higher value than the number of available standby servers.

rpl.journal.ack.min

Server

0

Set to 0 means that if the standby stops running, transactions will continue to be processed without requiring acknowledgments. If then the master fails, you might lose data.

Set to 1 means that if the standby stops running, update transactions will not complete and therefore, if the master then fails, no data from completed transactions are lost.

rpl.labels.global

Server

0

With a distributed Perforce service, there are both local and global labels. Local labels are restricted to a single edge server, and cannot be used on other servers. Global labels are created and updated on the commit server, and are visible to all servers. However, global labels can only be used with global (unbound) client workspaces.

For the 2013.2 release, the default is for labels to be local. Set rpl.labels.global to 1 to make labels global by default.

When this configurable is set to 0, users can use the -g option with the commands p4 label, p4 labelsync, and p4 tag to create or update global labels. When this configurable is set to 1, the meaning of the -g option is inverted to allow updating of local labels.

rpl.verify.cache

Server

0

If set, a replica server will re-verify the integrity of a cached file every time it delivers the file to the user, If the files do not match, it will re-fetch the file from the upstream server. This is computationally expensive on the replica and typically only useful in conjunction with Perforce technical support.

run.users.authorize

Server

0

If set, requires a user to authenticate before running p4 users.

security

Server

0

Server security level:

0: Legacy support: passwords not required, strength requirements unenforced.

1: Strong passwords required, existing passwords not reset, compatible with pre-2003.2 client software.

2: Strong passwords required, existing passwords reset, requires 2003.2 or higher client software.

3: Passwords must be strong, and ticket-based authentication (p4 login) is required.

4: All of the above restrictions. Also, authenticated service users must be used for all replica server and remote depot connections to this server.

server.allowfetch

Server

0

Determines whether changes can be fetched.

  • If set to 1, this server can fetch from other servers.

  • If set to 2, other servers can fetch from this server.

  • If set to 3, both 1 and 2 are allowed.

server.allowpush

Server

0

Determines whether changes can be pushed.

  • If set to 1, this server can push to other servers.

  • If set to 2, other servers can push to this server.

  • If set to 3, both 1 and 2 are allowed.

server.allowrewrite

Server

0

If set to a non-zero value, allows this server to run the p4 unsubmit and p4 fetch -u commands.

server.commandlimits

Server

0

Policy for per-command resource limits:

0: All users may use command-line overrides for MaxResults, MaxScanRows, and MaxLockTime limits defined in the p4 group specs.

1: Per-command options may specify lower, but not higher, resource limits.

2: All command-line resource limit options are silently ignored.

server.depot.root

Server

none

The filesystem location with respect to which a relative address given in the Map: field of a depot form is evaluated. If it is not set, the Map: field relative address is evaluated with respect to the value stored in P4ROOT. For more information, see the p4 depot command.

server.locks.dir

Server

server.locks

Directory for server locks, specified relative to P4ROOT. To disable server locking, set this configurable to disabled. (If db.peeking is nonzero (enabled), server.locks cannot be disabled; you can disable locking by setting server.locks.sync to 0.)

server.locks.sync

Server

0

When set, the p4 sync command takes a client workspace lock in shared mode. The default value of 0 prevents sync from taking a client workspace lock.

If db.peeking is enabled, the server.locks.dir directory must exist. The changes to locking behavior that occur when you enable db.peeking obviate the need to set server.locks.dir to disabled, but if performance issues arise with respect to multiple concurrent, large, and/or interrupted p4 sync commands, you can obtain the old behavior for syncing by setting server.locks.sync to 0.

server.maxcommands

Server

0

If monitoring is enabled, and if this configurable is set to a nonzero value, the service refuses to accept more than this many simultaneous command requests.

serverlog.counter.n

Server

none

The counter name for the structured log file designated by n. (For example, if the structured log file is errors.csv, n is 3.)

See "Logging and structured files" in the Perforce Server Administrator's Guide: Fundamentals for more information.

serverlog.file.n

Server

none

Server log file name associated with each structured log file. See p4 logparse for a list of valid filenames.

serverlog.maxmb.n

Server

none

For each structured log file, the size, in megabytes, at which the associated log file is rotated.

serverlog.retain.n

Server

none

For each structured log file, the number of rotated log files to retain on the server at any one time.

serviceUser

Server

none

The service user as which a server (or proxy) authenticates against a master server in a replication/proxy configuration, or against a remote server in the context of remote depots.

spec.hashbuckets

Server

99

Number of buckets (subdirectories) into which files in the spec depot are hashed. Set to 0 to disable hashing, which may slow performance on older filesystems where performance is a function of the number of files per directory.

ssl.secondary.suite

Server

0

By default, Perforce's SSL support is based on the AES256-SHA cipher suite. To use CAMELLIA256-SHA, set this tunable to 1.

startup.n

Server

none

For replica servers, set startup.1 through startup.n to be p4 pull threads to be spawned at startup.

The startup.n configurables are processed sequentially. Processing stops at the first gap in the numerical sequence; any commands after a gap are ignored.

statefile

Server

state

For replica servers, the file used by the server to track the current journal position.

submit.noretransfer

Server

0

Always re-transfer files after a failed submit.

Set this configurable to have the server check whether files are already in the expected archive location and to not re-transfer files when retrying a failed submit.

You can override the set behavior by using the --noretransfer option to the p4 submit command.

submit.unlocklocked

Server

0

When set, open files that users have locked (with the p4 lock command) are automatically unlocked after a failed p4 submit.

sys.rename.max

Server

10

Limit in microseconds for retrying a failed file rename. Affects Windows Rename() retry loop.

sys.rename.wait

Server

1000

Timeout in microseconds between file rename attempts. Affects Windows Rename() retry loop.

template.client

Server

none

Specifies the default client to be used as a template if the user omits the -t option on the p4 client command.

template.label

Server

none

Specifies the default label to be used as a template if the user omits the -t option on the p4 label command.

triggers.io

Server

0

If set, specifies that triggers will not receive their parameters via command line variables. Rather, they will receive a dictionary of key/value pairs sent to their STDIN. Triggers can use their dictionary response to reply to the server via STDOUT.

zerosyncPrefix

Server

none

If set, changes default behavior of p4 sync such that if a client workspace begins with this prefix, all sync operations to affected workspaces assume p4 sync -k, and do not alter contents of the workspace.