Why is email data purging not freeing up any disk space?
FocalScope keeps a copy of deleted emails so they can be restored in future if needed. This accumulation of deleted emails grows the FocalScope database and may eventually saturate the remaining hard disk space. This article details how FocalScope's database uses space on the hard disk as well as how the data purging function in FocalScope should be configured for automatic operation.
After a substantial amount of emails are purged from the FocalScope database, the size occupied by the FocalScope database on the hard disk remains the same, i.e., it appears as if no disk space was freed by the data purge, despite the purged emails no longer appearing in FocalScope.
Deleting emails is a multi-step process, and it can take some time for the reported disk space reflects the changes. Emails in the [Deleted] tab are kept in the database indefinitely to provide FocalScope administrators the ability to restore deleted emails. It is possible to configure email data to be purged from the FocalScope database automatically, but even then the space inside the database that was occupied is simply marked as free and will be reused for new emails. Thus, deleting a large volume of emails will not decrease the disk space occupied by the FocalScope database. This behavior of the FocalScope database depends on the configuration of the SQL server engine, which by default is configured to never automatically shrink its size on the disk (http://msdn.microsoft.com/en-us/library/ms189035.aspx). However, the database administrator (DBA) can change this default behavior.
Understanding disk space usage of the FocalScope database
Confusion over whether or not hard disk space has been freed after a data purge usually results from the following:
- The database file is a complex structure and it can contain free space that resides inside the database
- Thus, when a new email enters the system, the [Size] field will not increase, but space will be taken from the [Space Available] portion of the database
- When data is purged from the database, the [Space Available] value is increased, but the [Size] (on disk) does not decrease, as this is the 'footprint' of the database on the hard disk
Figure 1 - Database size on disk
Configuring automatic Data Purging to limit database growth
When users delete an emails from the User Interface, those emails are only marked as deleted. The actual purging of the data (if configured) happens later on a schedule to protect the system from performance bottlenecks that may be induced by reallocating or removing large volumes of data.
If disk space availability is limited it may be best to set the data purging function to purge more recent email data. To configure automatic data purging, do the following:
- In the [Main menu], select [Screen > Administration]
- Click on the [Advanced Properties] tab (highlighted)
- Navigate to the [Maintenance > Data purging] folder
- In the right-hand pane, in the [Purge deleted e-mails older than] field, enter the age deleted emails much reach before they are automatically purged from the system. Please note, you can speed up reaction of the system to bulk delete operations by decreasing the value in the [Purge deleted e-mails older than] field. It is, however, not recommended that specify a value less than 2, as it may affect general performance of the system. If the ability to recover deleted emails is not required, specify a value of 2. If the number of emails users delete from the system is equal to the number of incoming emails, then, if automatic data purging is switched on, the database size on the hard disk will not grow
- Tick the [automatically purge deleted emails] flag to enable automatic purging
- Under the [Schedule] section, click [New]
- In the [Schedule] window, set the start and end time in the [Time from] and [Time to] fields. Please note, it is recommended that you set the purging schedule to operate outside office hours, as it can affect system performance when many users are logged into and using the system
- Specify the frequency at which the purging cycle will run in the [Frequency (min.)] field
- Set the amount of emails that will be purged per purge cycle in the [Items per batch] field
- Click [Ok] to save the purge schedule parameters
- If you need to make any changes to the purge schedule in future, simply click the [Edit] button
- Click [Save] to save the configuration
Figure 2 - Configuring automatic data purging