Common Perforce Server Problems on Windows

Info & Tags

Article #:
23
Created:
03/13/07
Modified:
08/28/08
Tags:
common problems, p4d, windows

Related Articles

SUMMARY

This article details some common causes of Perforce Server problems on Windows


DETAILS

Virus Checkers

One of the most common problems seen on Windows is related to virus checkers. While there is a constant battle between the latest virus and the most thorough virus checker, often times a Windows application becomes the casualty.

The Perforce Windows Server expects to be the only application accessing the Perforce meta data. The Perforce metadata is contained in the db.* files under the Perforce Server root directory. Internally the Perforce Server uses file locking to synchronize multiple client access to critical sections in the metadata.

Many virus checkers have a dynamic feature that monitors files as they are in use. As soon as the file has been updated, the virus checker opens and scans the file. This serves to block the Perforce Server from processing the next client request. Usually the virus checker does not use the same type of file locking or locking order as the Perforce Server. This generates a DB error in the Perforce Server and terminates the client command. Depending on the severity of the DB error, the Perforce Server might also shutdown.

Use of a virus checker should be avoided on a Perforce Server machine. If possible, use a dedicated machine for your servers. Use a strategy that shields the dedicated server from outside influence. Create a fully populated Perforce client workspace and run a virus checker there. If you have to run a virus checker on the Perforce Server machine, insure that it is not checking the metadata files or the repository files under the depot directories. Avoid virus checkers that attempt to filter the TCP/IP data stream.

Logitech Video Driver

The Logitech Video driver, LVPrcSrv.exe, is known to cause the Perforce Windows installer to exit. This video driver intercepts installer calls to the Win32 API DuplicateHandle function causing an immediate installer exit without the possibility of collecting an error. The only known work around, to date, is to kill the LVPrcSrv.exe process in the Task Manager, run the Perforce Installer, then restart the LVPrcSrv.exe process. Logitech has been contacted about this problem and has not responded.

Missing Checkpoint and Depot Backups

Perform regular Perforce Server checkpoints. For more information on Perforce backup and recovery concepts, consult our System Administrator's Guide. Your checkpoints are complete if the current journal has been renumbered and a new journal file has been created. The output from a typical checkpoint operation, p4d -jc, should look like the following:

Checkpointing to checkpoint.83...


Saving journal to journal.82...


Truncating journal...

If you are using p4 admin checkpoint, you will not see this output.

Note the last line is indicating the creation of a new journal. If this line is missing from your checkpoint output, there is a good chance your checkpoint is incomplete. If this line is missing, call or email Perforce Technical Support at support@perforce.com.

Establish good system backup practices. Verify that your backups are working. Most importantly make sure that you can recover from the backup device. Many times users do not realize that backups are failing or a recovery is not possible until it is too late.

Disk Space Capacity

Make sure the Perforce Server machine has plenty of disk space. If the Perforce Server overruns the disk space, meta data corruption can occur. If you suspect you have run out of disk space, you can check the Perforce Server meta data using the p4d -xv command while in the Perforce Server root, P4ROOT, directory.

You can conserve space used in checkpoints by using the -z flag when creating a checkpoint, p4d -z -jc. When checkpoints are performed and verified, you need to keep only the last 2 or 3 checkpoints and corresponding journal files for safety; although this does depend on your system backup scheduling.

Automatic Windows Updates

Microsoft supplies a convenient method to apply Windows updates. We suggest Windows updates be applied manually. If possible, select the backup option in case the update must be removed. Schedule the updates to better determine before or after system instabilities. At a minimum, apply the security patches which help prevent system security attacks. As a general rule of thumb Perforce tries to support all the latest security updates. If you notice problems after a security update please call or email Perforce Technical Support at support@perforce.com. Make sure to inform the Perforce Technical Support engineer that this issue might be related to a Windows update, this helps to solve the problem in a timely manner.

System Memory Usage

If you are managing a large site, it is important to note that the Windows x86/32bit application can only use up to 2 Gbytes of virtual memory. If your server is approaching 2 Gbytes of memory usage, there is a Perforce Server for Windows x64/64bit. 64bit Windows systems are not affected by the 2Gbyte limit. This x64/64bit server version is NTX64 and can be found in 2006.2 and later Windows installers. The 2006.2 and later Windows installers contain two Perforce Servers, NTX86 and NTX64. The installer auto-detects which one is installed.

We recommened against using either the /3GB or /PAE Windows 32 bit boot.ini flags due to Windows 32 bit performance issues.

Network Disk Performance

Using a network disk for the Perforce Server meta data slows server performance. In a typical local area network, the maximum data transfer rate is 100 megabits per second. Each byte of data is in a 10 bit frame. In the best case a LAN can transfer 10 Mbytes per second. More realistically the transfer rates are between 4 and 6 Mbytes per second. For a Gigabit network, multiply these numbers by 10. In either case, an inexpensive SATA drive is usually faster.

Some larger sites use network storage for Perforce Server repository files. While this can slow Perforce Server access, the trade off in IT administration is understandable. In this case try to use a Gigabit network connection between the Perforce Server machine and the network storage device.

There is a disk throughput testing tool available if you are interested in testing your disk performance. Email Perforce Technical Support at support@perforce.com, and ask for the "fstst" tool.

Windows Service Permissions

The Perforce Service is, by default, configured by the Perforce Windows installer to use the LocalSystem user account. In some cases it is necessary to assign a different user account to the Perforce service. This user account must have access to the machine registry. You can verify access to the registry by logging on as that user and running this command:

p4 set -S Perforce

If this command succeeds, the user account has the necessary permissions on the registry. The user account must also have access to the directory structure under the Perforce Server root (P4ROOT). If in doubt about this access, try creating a file or directory as this user under the intended Perforce Server root directory.