What Is Virtual File Sync? How P4VFS Accelerates Sync Times
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:
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:
- the Helix Core Server (P4D) version 2023.1+
- the Helix Application Programming Interface for C/C++ (P4API) version 2023.1+
- the Helix Core Virtual File Service (P4VFS) version 2023.1+
- 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.
- Step 1: Install your Helix Core server (version 2023.1 or greater), or upgrade your existing Helix Core server to version 2023.1 (or greater). This also automatically upgrades the version of the Helix Application Programming Interface for C/C++ (P4API).
- Step 2: Install the Helix Virtual File Service (P4VFS) client.*
- Step 3: Upgrade your Helix Visual Client (P4V) to version 2023.2 (or greater), and/or Upgrade your Helix Command-line Client (P4) to version 2023.1 (or greater).*
*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:
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.
Step 3: Check the “altsync” property on the workspace dialog.
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.
Note that all files that are “metadata only” are now shown with a new “cloud” badge in the workspace view:
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:
Note that inspecting a specific file that is “metadata only” will reveal a size of 0 bytes on disk:
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).
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.
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.Back to top