Illustration: Virtual File Sync - P4VFS
May 26, 2023

What Is Virtual File Sync? How P4VFS Accelerates Sync Times

Version Control

Virtual File Sync is a highly anticipated feature set that has the power to significantly accelerate sync times for Perforce Helix Core users. Here, we explain what Virtual File Sync is, how to set it up, and how to use it.

Read on to learn more, or skip to the section that interests you most:

Back to top

What Is Virtual File Sync?

Virtual File Sync is a feature that provides users with the ability to only sync file metadata on the initial request, and later choose to download the full file content when needed. 

It consists of 4 components:

  1. the Helix Core Server (P4D) version 2023.1+
  2. the Helix Application Programming Interface for C/C++ (P4API) version 2023.1+
  3. the Helix Core Virtual File Service (P4VFS) version 2023.1+
  4. a Helix Core client such as Helix Visual Client (P4V) version 2023.2+ – OR – Helix Core Command-line Client (P4) version 2023.1+

Why Did We Build Virtual File Sync?

Often, teams need to sync many large assets across remote and distributed environments, which takes a lot of time. In the past, some of our customers have tried to implement similar features on their own with varying degrees of success.  

To ensure that all our customers have a reliable and efficient way to accelerate sync times, we implemented support for Virtual File Sync. Virtual File Sync provides users with a native experience within Helix Core that enables them to sync only the metadata elements for all assets across their workspaces and download the full file contents only when they need them (either by explicitly requesting files to be downloaded, or by opening the files in an application such as an editor or graphics program, which causes the files to be downloaded automatically. 

Back to top

Benefits of Virtual File Sync

Virtual File Sync will greatly accelerate sync times for teams working with large file sizes and reduce the amount of data transferred from the server to the user’s local machine. It also allows users to have multiple large workspaces on their machines (for example different releases of a project), since those workspaces typically take only 10-20% of the potential total size on disk if the user does not access all files in the workspace. This can result in significant data egress savings if you are running your Helix Core server in the cloud and user workstations are not in the cloud. 

Back to top

Limitations of Virtual File Sync

Currently, the Helix Core Virtual File Service (P4VFS) only supports the Windows platform. This also means that only Helix Core clients (ex: P4V, P4) running on Windows are currently supported. This implementation decision was purposeful as performance tests showed that operating system dependent solutions performed most optimally.

Back to top

How to Set Up Virtual File Sync

Here is how to set up and install Virtual File Sync.

*Windows 10.1709+ and Windows 11 are the only supported platforms

Rather watch a walkthrough on how to set up and use Helix Core Virtual File Sync? Here's a video tutorial:

Back to top

How to Use P4VFS (Helix Core Virtual File Service)

When you run P4VFS, this is how to use it. This section will assume you are using Helix Visual Client (P4V) as your preferred client.

Step 1: Launch the Helix Visual Client (P4V). Log in if necessary.

Step 2: Create a new workspace, or sync your existing workspace back to revision 0. For existing workspaces, context-click the workspace root in the workspace pane and choose the “Remove from Workspace” option to sync your workspace back to revision 0.

Screenshot: For existing workspaces, context-click the workspace root in the workspace pane and choose the “Remove from Workspace” option to sync your workspace back to revision 0.

Step 3: Check the “altsync” property on the workspace dialog.

Create workspace dialog showing the new “altsync” file option.

Step 4: Once the workspace is created, initiate a “Get Latest” button and watch as only file metadata is synced from the Helix Core server.

Get Revision Progress dialog showing only file metadata being transferred from the server to the client.

Note that all files that are “metadata only” are now shown with a new “cloud” badge in the workspace view:

Helix Visual Client (P4V) workspace view with new cloud badge indicating only metadata has been transferred for certain files.

Note that a new “provider” was registered with the Windows operating system, that the status column shows a “cloud” icon for all files that are “metadata only,” and that the size column shows an accurate file size:  
 

Windows Explorer view showing the newly register "cloud files provider" as well as a cloud icon in the Status column to indicate that only metadata exist for those files.  Also note the Size column indicates the accurate file size (the size the file would be assuming the file content was downloaded).

Note that inspecting a specific file that is “metadata only” will reveal a size of 0 bytes on disk:

Inspecting a file’s properties shows the Size on Disk to be 0 bytes, which also confirms that only metadata exists for this file.

Step 5: Double-click a file from the Windows Explorer view of the workspace, which will open the file in the default application based on the file type. Notice the progress dialog showing the file content being downloaded (assuming it hasn’t previously been downloaded).  
 

Built-in progress dialog in Windows which is displayed when the actual file content is being downloaded from the Helix Core server.  This progress dialog only appears when the amount of data being transferred is over Microsoft’s defined threshold.

Step 6 (optional): Right-click the file that was downloaded in step 5 and choose the “free up space” option to remove the file content and only retain the file metadata.

The Free up space option allows a fully downloaded file to go back to being metadata-only.

Alternately, right-click a file that you never want to be virtually synced and choose the “Always keep on this device” option if you always want to sync both the metadata and file content on a “Get Latest” action.

📘 Fore more technical documentation, see the Helix Core Virtual File Service (P4VFS) Guide.

Back to top

Use Perforce Helix Core Free

Don’t have Helix Core yet? Get the leading version control system for teams who need to accelerate development and streamline collaboration on big projects. Use it free for up to five users, forever.

GET HELIX CORE FREE

Back to top