- File Space Management Strategies
- File Space Management User’s Guide (not yet available)
- HDF5 Library APIs
- Differences between HDF5-1.10 and HDF5-1.8
The mechanisms used for this strategy are free-space managers with embedded paged aggregation and virtual file drivers.
See the RFC on this feature for complete details.
The APIs listed below from the HDF5 Reference Manual provide a means for users to directly manage the file space management feature.
|H5FgetH5F_freeGET_sectionsFREE_SECTIONS||Retrieves free-space section information for a file|
|H5FgetH5F_freespaceGET_FREESPACE||Returns the amount of free space in a file|
|H5FgetH5F_info2GET_INFO2||Returns global information for a file|
|H5Pget H5P_fileGET_spaceFILE_strategySPACE_STRATEGY||Retrieves the File Space Strategy for a file creation property list|
|H5Pset H5P_fileSET_spaceFILE_strategySPACE_STRATEGY||Sets the File Space Strategy for a file creation property list|
|H5Pget H5P_fileGET_spaceFILE_pageSPACE_sizePAGE_SIZE||Retrieves the file space page size for paged aggregationH5Pset|
|H5P_fileSET_spaceFILE_pageSPACE_sizePAGE_SIZE||Sets the file space page size for paged aggregation|
|When printing the file creation property information for the superblock via the -B option, |
|When printing the file space information via the |
|The following options were added to |
File space management strategies were introduced via H5P_SET_FILE_SPACE_STRATEGY to manage the unused space in a file.
While a file is open, HDF5 tracks and re-uses the unused space in the file according to the strategy used. If using a strategy that uses the free space manager, then free space can be tracked across file opens by use of the "persist" flag and a minimum free space threshold can be specified. If not specifying a strategy that uses the free space manager, then when the file is closed, any free space is lost and will remain in the file.
File space management only occurs between the HDF5 file open and close, and the free space is NOT tracked beyond file closed. In other words, when you delete a dataset, the space used by the dataset becomes free space that can be re-used as long as the file is open. Once the file is closed, the free space is lost and will remain in the file.
The h5repack utility can be used to remove the unused space in a file, by writing the file to a new file. This utility comes with the HDF5 binary distribution.