Perforce Public Knowledge Base - Maximizing P4V Performance
Reset Search
 

 

Article

Maximizing P4V Performance

« Go Back

Information

 
Problem

How do I make P4V run more efficiently?


Solution

To obtain the best performance from P4V, observe the following guidelines and suggestions:

  • Limit P4V from polling the server:
    1. Select the "Preferences..." menu item in P4V.
    2. Select the "Connection" tab. ("Server Data" in P4V 2012.1 and greater)
    3. Set the "Check server for updates every NNN of minutes" field to a higher number or zero (to never check for updates).
    4. Click "OK" to close the Preferences window.

    P4V checks the Perforce server less frequently, which also reduces the load on the server.

    Note: If set to never check for updates, users need to manually refresh P4V by selecting the "View | Refresh All" menu item.
     
  • Limit the maximum number of files displayed per changelist:
    1. Select the "Preferences..." menu item in P4V.
    2. Select the "Connection" tab. ("Server Data" in P4V 2012.1 and greater)
    3. Set the "Maximum number of files displayed per changelist" field to a lower number.
    4. Click "OK" to close the Preferences window.

    Lowering the default value of "1000" reduces the amount of information P4V has to retrieve from the server for each file in the changelist.
     
  • Disable "Show integration history in Time-lapse View by default":
    1. Select the "Preferences..." menu item in P4V.
    2. Select the "General" tab. ("Tools" in P4V 2012.1 and greater)
    3. Clear the "Show integration history in Time-lapse View by default" checkbox.
    4. Click "OK" to close the Preferences window.

    If you have large branches with a lot of revisions, turning the integration history off limits the number of times P4V has to poll the server.
     
  • Disable "Use a distinct file icon for modified files":
    1. Select the "Preferences..." menu item in P4V.
    2. Select the "General" tab. ("Files" in P4V 2012.1 and greater)
    3. Clear the "Use a distinct file icon for modified files" checkbox.
    4. Click "OK" to close the Preferences window.

    P4V uses a hash algorithm to compare the workspace file with the file originally retrieved from the server. These comparisons can degrade P4V's performance if you have a large number of files opened for edit.
     
  • Avoid mapping remote depots to workspaces:

    Syncing files from a remote depot is far slower than working with local depots. A better approach is to have an administrator integrate files from a remote depot into a local branch and sync from there.
     
  • Limit the number of items retrieved from the server:
    1. Select the "Preferences..." menu item in P4V.
    2. Select the "Connection" tab. ("Server Data" in P4V 2012.1 and greater)
    3. Set the "Number of changelist and job entries to fetch at a time" field to a lower number.
    4. Click "OK" to close the Preferences window.

    If the Perforce server contains a large number of jobs, changelists, branches, or labels, reducing the number of these items that the server fetches at a time from the default (1000) improves performance.

    Note: This value only applies to jobs and changes when using P4V with Perforce server versions 2005.2 and earlier.
     
  • Implement MaxScanRows, MaxResults, MaxLockTimes:

    The Perforce superuser on your system can configure the Perforce server to limit the amount of data on which a single command can operate by assigning users to groups and setting the MaxResults, MaxScanRows, and MaxLockTimes parameters for the groups.  For details, refer to the Perforce System Administrator's Guide and Maximizing Perforce Performance.
     
  • Break file retrievals into smaller operations:
Even if an administrator sets the MaxResults, MaxScanRows, or MaxLockTimes settings as mentioned above, this does not impede users running P4V if they avoid performing "Get Revision" operations on directories that contain a large number of files. Instead, break a single large "Get Revision" operation into several, each with fewer files.

  • Use tighter client workspace views:

    Each client workspace view should access small portions of the depot. Create several clients if needed. See Using Tight Views in the Perforce System Admistrator's Guide.
     
  • Hide deleted depot files:

    Sometimes narrower client workspace views are not feasible. A large site with a large number of files in its depot, numerous users, and numerous workspace specifications might require wider views. The following P4V settings are recommended for the best performance and minimum impact on the Perforce server:
    • Select the "Hide Deleted Depot Files" option in the "View | Filter Depot" menu. If your site has a large number of deleted files, this reduces the number of depot files the P4V client has to display and can result in enhanced performance.
       
    • Do not view the entire depot tree. Select the "Tree restricted to workspace view" option in the "View | Filter Depot" menu.
       
  • Avoid DNS lookups:

    If using an IP address instead of a host name on the command line appears noticably faster, you might be having performance problems related to using a DNS server. If these problems cannot be resolved, you can gain performance while starting P4V by specifying an IP address instead of a node name in the "Server" field of the "Open Connection" dialog.

  • Close the P4V Dashboard:

    The P4V Dashboard displays handy information, but incurs an overhead.
     
  • Do not restore the workspace and depot tree states when opening connections:
This will reduce the number of "fstat" commands to the server, freeing up server resource for other commands. This can be done by setting the  "Don't expand Workspace and Depot trees to their previous state when opening connections" options under P4V's preferences -> Connections.
  • Cancel an operation:

    If you inadvertently start a long-running operation, you can cancel it by clicking the cancel button in the P4V toolbar.
     
  • Work around Linux 2.6 kernel limitations
Due to changes in the way TCP window scaling was implemented within the Linux 2.6 kernel and exemplified from 2.6.17+, adding the following lines to /etc/sysctl.conf, might improve performance when using P4V on Linux:

net.ipv4.tcp_wmem = 4096 32768 131072
net.ipv4.tcp_rmem = 4096 87380 174760
net.ipv4.tcp_window_scaling = 0
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255