Unloading infrequently-used metadata
Over time, Helix Server
accumulates metadata associated with old projects that are no longer in
active development. On large sites, reducing the working set of data,
(particularly that stored in the
db.labels tables) can significantly improve performance.
Create the unload depot
To create an unload depot named
depot unload, and fill in the resulting form as
Depot: unload Type: unload Map: unloaded/...
In this example, unloaded metadata is stored in flat files in the
/unloaded directory beneath your server root (that is, as
specified by the
After you have created the unload depot, you can use
p4 reload to manage your
installation’s handling of workspace and label-related metadata.
The output of p4 -ztag info includes unloadSupport enabled if the administrator has created a depot of type unload. If not, the output includes unloadSupport disabled.
Unload old client workspaces, labels, and task streams
p4 unload command transfers infrequently-used
metadata from the Helix Core Server
files to a set of flat files in the unload depot.
Individual users can use the
-s flags to unload client workspaces, static labels, or task
streams that they own. For example, maintainers of build scripts that
create one workspace and/or label per build, particularly in continuous
build environments, should be encouraged to unload the labels after each
$ p4 unload -c oldworkspace $ p4 unload -l oldlabel
Similarly, developers should be encouraged to unload (
-s ) or delete
p4 stream -d ) task
streams after use.
To manage old or obsolete metadata in bulk, administrators can use the
-ac flags in
conjunction with the
-d date and/or
user flags to unload all static labels and workspaces
older than a specific
date, owned by a specific
user, or both.
By default, only unlocked labels or workspaces are unloaded; use the
-L flag to unload locked labels or workspaces.
To unload or reload a workspace or label, a user must be able to scan
all the files in the workspace’s have list and/or files tagged by
the label. Set
enough (see Limits for users in multiple groups) that
users do not need to ask for assistance with
p4 reload operations.
Accessing unloaded data
commands such as
p4 fstat ignore unloaded
metadata. Users who need to examine unloaded workspaces and labels (or
other unloaded metadata) can use the
-U flag when using
these commands. For more information, see the
Helix Core Command-Line (P4) Reference.
Reloading workspaces and labels
If it becomes necessary to restore unloaded metadata back into the
db.labels table, use the