Versant Compact

Online Database Maintenance

Versant Compact (V/Compact) is an add-on module for the Versant Database Engine. V/Compact is a database reorganization tool for applications that frequently delete large numbers of objects. The tool reclaims unused disk space from deleted objects in your database, increases available disk space and improves overall database performance, without interrupting the normal database operation. V/Compact is tightly integrated with the Versant Management Center.

How V/Compact Works

In a freshly populated database the objects are efficiently packed on disk in storage units called pages. A compact database provides optimal performance, due to efficient allocation of data on disk. A compact database also utilizes the back end cache to the fullest extent because each cached page contains the maximum amount of objects.

Over time, as objects grow in size or are deleted, empty spaces can appear in the database resulting in the fragmentation of data segments. As a result performance may degrade and disk usage increases. Versant has addressed this issue by introducing V/Compact, a database administration tool providing the ability to analyze a database for page fragmentation and to reorganize the data to restore optimal performance.

Analyzing a Database Using V/Compact

To help the database administrator determine if a database needs reorganization, V/Compact performs a detailed analysis of the database and reports the free space and degree of fragmentation by inspecting every page in the database.

Compacting a Database Using V/Compact

A dialog allows the administrator to select the class(es) which should be compacted in a database. Only objects of selected class(es) will be compacted, helping to further optimize the tool.



The database and class currently being compacted is displayed as well as a progress bar showing the progress for the entire operation. The dialog can be closed to run the operation in the background. The progress will then be displayed in the Versant Management Center Progress pane.

System Table De-fragmentation

V/Compact also reorganizes an important internal system table that is managing so called LOIDs (logical object identifier). The system table is a hash table that is used by the database server to look up physical object locations within the database volumes given an object's LOID as the key. It is implemented using a form of dynamic hashing scheme.

Due to high volume insertions and deletions into this hash table, the table can get fragmented over time leading to a large hash bucket directory as well as a large number of leaf pages containing very few or no key/data values. This fragmented table can lead to increased memory consumption, slower LOID lookups, and unnecessary disk space usage in the database.



The administrator can select to perform the system table de-fragmentation by selecting the "Compact System Tables" option in the appropriate V/Compact dialog. The "Threshold in %" selector allows the administrator to determine the level of fragmentation in the system tables at which the de-framentation is run. The tool can run on an online database and there is minimum impact on database client performance.

Benefits

V/Compact is an easy-to-use database administration tool with a graphical user interface already integrated in Versant's Management Console. Due to its highly configurable modes, the administrator can fine tune its use based upon the application's use cases.

Please contact sales@versant.com for more information on the V/Compact add-on module.