Saving disk space
All files versioned by Helix Server reside in subdirectories beneath the server root, as do the database files, and (by default) the checkpoints and journals. If you are running low on disk space, consider the following approaches to limit disk space usage:
- Configure
Helix Server
to store the journal file on a separate physical disk. Use the
P4JOURNAL
environment variable orp4d -J
to specify the location of the journal file. - Keep the journal file short by taking checkpoints on a daily basis.
- Compress checkpoints, or use the
-z
option to tellp4d
to compress checkpoints on the fly. - Use the -jc
prefix
option with thep4d
command to write the checkpoint to a different disk. Alternately, use the default checkpoint files, but back up your checkpoints to a different drive and then delete the copied checkpoints from the root directory. Moving checkpoints to separate drives is good practice:- to conserve disk space
- because old checkpoints are needed when recovering from a hardware failure, and if your checkpoint and journal files reside on the same disk as your depot, a hardware failure could make it impossible to restore your database.
- On UNIX systems, you can relocate some or all of the depot directories to other disks by using symbolic links. If you use symbolic links to shift depot files to other volumes, create the links only after you stop the Perforce service.
- If your installation’s database files have grown to more than 10 times the size of a checkpoint, you might be able to reduce the size of the files by re-creating them from a checkpoint. See Checkpoints for database tree rebalancing.
- Use the
p4 diskspace
andp4 sizes
commands to monitor the amount of disk space currently consumed by your entire installation, or by selected portions of your installation. See Monitoring disk space usage. - If you have large binary files that are no longer accessed
frequently, consider creating an archive depot and using the
p4 archive
command to transfer these files to bulk, near-line, or off-line storage. See Reclaiming disk space by archiving files.