During a full switch deployment, the SwitchableLocalFileSystem must delete all file assets from the target site’s inactive directory before updated content can be deployed from ATG Content Administration. On a large site, the deletion process can significantly delay updates to the live site. You can optimize deployment by configuring the SwitchableLocalFileSystem
to enable background deletion: when switch deployment begins, the VFS simply moves the current inactive directory to a temporary directory and proceeds with deployment. Separately, it launches another thread that is responsible for physically removing files from the temporary directory—which it typically defers until system resources are more plentiful.
Note: By default, full deployment of file system assets is optimized through checksum verification, which minimizes disk reads and writes (see Cache Checksums for File Assets). This is usually faster than full deployment with background deletion, where checksum verification is disabled (see Requirements and Constraints), so all files eventually must be physically removed from disk. In general, full deployment with background deletion is appropriate when you must purge a target site of all file system assets.
Properties
Three SwitchableLocalFileSystem
properties enable background deletion and control its behavior:
deleteInBackground
enables background deletion if set to true. By default, this property is set to false.deletionThreadPriorityDelta
lets you manually set the deletion thread’s priority. In general, you should let the system set thread priority, and omit this property.deletionThreadDelay
specifies in milliseconds how long the deletion thread waits before it begins to delete files from the temporary directory. If set to 0 (the default), deletion begins immediately.
Requirements and Constraints
The following requirements and constraints apply to background deletion of file system assets:
Background deletion only occurs during full deployments.
Checksum verification must be disabled, by setting the following file deployment property in the component
/atg/deployment/file/DeploymentConfiguration
:noVerificationByChecksum=true
ownerCacheEnabled
must be set to false in the VFS configuration of the production and staging servers (see Enable Tracking of File Ownership). As a result, you cannot deploy from multiple asset management servers.Background deletion prevents components from restarting properly, so it should not be used on the
ConfigFileSystem
.