[p4] p4fs - A fast non-fragmenting (NTFS) sync tool in public depot

Frank Compagner frank.compagner at guerrilla-games.com
Thu Feb 14 15:28:19 PST 2008


I've just submitted a project to the public depot that reimplements
the p4api FileSys class to demonstrate an improved way of syncing
files to an NTFS client. It significantly reduces file fragmentation
on the synced files, making both the sync itself and working with
those files after the sync a lot faster. This might not matter much
if you mostly sync relatively small files (such as source files), but
it definitely makes a difference with large (usually binary) files.

It's called p4fs (for p4 fast sync) and can be found at:
http://public.perforce.com:8080/guest/frank_compagner/
(There appears to be a problem with the web interface of the public
depot at the moment, but I assume that will be fixed soon.)
It contains full source as well as pre-compiled binaries to two tools:
- p4fs.exe, an (almost) drop-in replacement for the p4 commandline
  client that employs the improved way of syncing.
- P4fsV.exe, a tool meant to be used as a P4V or P4Win custom tool,
  with a cancel button and progress bar.
There is also a readme with full project details.

While these tools are perfectly serviceable and have been used at
Guerrilla Games for some time now without any problems, the real aim
of this project is to try to get Perforce to improve the way files are
written to disk under NTFS. As the project demonstrates, this is not
hard to do and I hope to convince Perforce support of the feasibility
of this. File fragmentation is a performance bottleneck not only on
the client, but on the depot and proxy disks as well, and only the
Perforce developers can fix that.

As an aside, the project might also be interesting to anybody
attempting to reimplement the FileSys class on any platform, I've
discovered quite a few tricky details while doing this.

----------------------------------------------------------------
Frank Compagner                                  Guerrilla Games



More information about the perforce-user mailing list