Vacuuming
Vacuuming permanently deletes consolidated files to clean up space and boost performance, at the cost of time traveling granularity.
The vacuuming process permanently deletes consolidated fragments, fragment metadata, commits, array metadata, and group metadata, in order to clean up space. TileDB separates consolidation from vacuuming, in order to make consolidation process-safe in the presence of concurrent reads and writes.
Warning
You should note two important things:
- Vacuuming is not process-safe and you should take extra care when invoking it.
- Vacuuming may affect the granularity of the time traveling functionality (visit the Key Concepts: Time Traveling section for more details).
Vacuuming applies to the following, which is controlled by configuration parameter sm.vacuum.mode
:
- Fragments (mode
fragments
): Vacuuming will delete all the subfolders of fragments that participated in generating one or more fragments during consolidation. - Fragment metadata (mode
fragment_meta
): Vacuuming will delete all the fragment metadata files corresponding to fragments whose metadata already appear in another fragment metadata file, which was the result of fragment metadata consolidation. - Commits (mode
commits
). Vacuuming will delete the commit files of the fragments that participated in a commit consolidation process. - Array metadata (mode
array_meta
). Vacuuming will delete the array metadata files that participated in the array metadata consolidation. - Group metadata (mode
group_meta
). Vacuuming will delete the group metadata files that participated in the group metadata consolidation.
Section Tutorials: Vacuuming contains examples on vacuuming the above TileDB components.