Release Notes for P4P, the Perforce Proxy November, 2003 Introduction ------------ P4P, the Perforce Proxy, improves Perforce performance in WAN topographies by mediating between Perforce clients and servers to cache frequently transmitted file revisions. By intercepting requests for cached file revisions, P4P reduces demand on the Perforce server. To improve the performance obtained by Perforce clients that access a central Perforce server across a WAN, set up P4P on the network close to the clients and configure the clients to access P4P, then configure P4P to access the central Perforce server. With this configuration, file revisions are sent once from the central server and cached by the proxy. Subsequent requests for the same revisions are delivered from the proxy, reducing both network traffic across the WAN and CPU load on the central server. On a LAN, you can obtain performance improvements by setting up several proxies to divert the workload from the server's CPU and disks. Additional information is available in Chapter 9 of the Perforce System Administrator's Guide, available from Contents 1. System Requirements 2. Starting P4P 3. Administering P4P 4. Release History 1. System Requirements ====================== * Perforce server: 2002.2 or higher * Perforce clients: any version, any client program * OS requirements: sufficient disk space for storing file revisions (P4P does not store server metadata) 2. Starting P4P =============== To start P4P, you invoke the p4p executable. For example, the following command line starts a proxy that communicates with a central Perforce server located on a host named 'centralserver', listening on port 1666. Perforce clients connect to P4P on port 1666 on the machine where the proxy runs. P4P file revisions will be stored under a directory named /local/proxyroot. p4p -p 1666 -t centralserver:1666 -r /local/proxyroot The following command-line flags are supported. * Proxy-specific options -c Do not compress files transmitted from the Perforce server to P4P -d Run as a daemon (fork first, then run) -f Run as single-threaded server -i Run for inetd (socket on stdin/stdout) -q Suppress startup messages -s Run as an NT service (or invoke as p4ps) * General options -h or -? Display this message -L log File to which messages are logged (default $P4LOG, or stderr if $P4LOG is not set) -p port Port on which P4P accepts Perforce client requests (default $P4PORT or 1666 if $P4PORT is not set) -r root Proxy cache directory (default $P4PCACHE or directory where p4p is started if $P4PCACHE is not set) -t port Port that P4P uses to connect to a server (default $P4TARGET or perforce:1666 if $P4PORT is not set) -v level Specifies debug mode (see Perforce System Administrator's guide for details; default $P4DEBUG or none if $P4DEBUG is not set) -V Display the version of the Perforce server being supported 3. Administering P4P ==================== No backups required ------------------- You do not need to back up the P4P cache directory. If necessary, P4P reconstructs it based on Perforce server metadata. Loading the cache directory to obtain best initial performance -------------------------------------------------------------- P4P stores file revisions only when one of its clients requests them. File revisions are not "prefetched." Note that the performance gain that is provided by P4P only comes into effect after file revisions are cached. After starting P4P, you can load the cache directory by creating a client and syncing it to the head revisions, enabling other clients that subsequently connect to immediately obtain the performance improvements provided by P4P. Managing disk space consumption ------------------------------- P4P saves file revisions in its cache directory. Note that P4P's disk space consumption only increases. P4P does not delete its cache files or otherwise manage its consumption of disk space. To recover disk space, remove files under the proxy's root. It is safe to delete the proxy's cache files while the proxy is running. Protections ----------- The p4 protect command can distinguish connections coming from a proxy if the string 'proxy-' is prepended to the IP addresses of the true client and used in the protections table. For example, 'proxy-*' applies to all connections from all proxies and 'proxy-10.0.0.5' identifies a host with an IP address of 10.0.0.5 and connecting to p4d through a proxy. Remote Depots ------------- The proxy is designed to operate between a p4 client and a p4 server (p4d). It does not work between two p4 servers in a remote depot configuration. Attempting to connect to a remote depot via a proxy will result in the proxy logging an error about this configuration (i.e. can not proxy for remote depots) and an error at the p4 server about unable to access remote depot and an error at the client. 4. Release History ================== Unless stated otherwise you can intermix any release Perforce client with any release Perforce server, but any functionality new to 2003.2 requires you to upgrade the client, the proxy and/or the server. The Proxy requires a server upgrade to 2002.2 You may see improved proxy performance if you upgrade your server to 2003.1 See marks in the notes below. * -- requires new p4 client program ** -- requires new p4d server program *** -- requires new p4p proxy program Changes since 2003.1 #46146 ** *** The compress option in client specifications now effects compression only between the proxy and the client if the proxy is in use. Previously a client with compression enabled would cause all communication to be compressed, i.e. both between the server and proxy; and between the proxy and the client. Now, compression between the server and the proxy is exclusively controlled by the proxy's -c flag. (Bug #11194) #46044 ** *** Text files with keyword expansion (ktext, text+k) were not always handled properly when the proxy was in use. This is fixed. (A new p4p or p4d is required, but performance is best if both the new p4p and p4d are in use.) (Bug #11212) #44303 *** Warning message text changed when the proxy can not update its cache to indicate the proxy's cache file name. (Bug #11033) -------------------------------------------------------------------------- -------------------------------------------------------------------------- Bugs fixed after general release 2002.2 #43921 *** The proxy's RCS based cache files could be corrupted if concurrent updates to that RCS file occurred due to multiple clients requesting a revision from that file. Fixed. Related, the executable bit will no longer be set on RCS files. (Bug #10512) #43265 *** The proxy would terminate operations early if it had a problem updating its cache. Now, errors are logged and reported to the client in this case, but processing contines. In this case the client will be updated but the proxy's cache is not, and the proxy's cache should be investigated for corruption or file system overflow. (bug #10918) #43075 *** Performance of the proxy sending many small files was poor due to not keeping network connections full. This change improves performance by better keeping data in motion. (bug #10892) Release 2002.2, November 2002. Bug fixed in 2002.2 beta. #37999 *** Configuring the proxy with an identical P4PORT and P4TARGET (or -p and -t) ports would cause the server to fork (or spawn new threads) until the machine's resources are totally consumed. (Bug #9709).