Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
strategy
strategy
File Space Management Strategies

...

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_SECTIONSRetrieves free-space section information for a file
H5FgetH5F_freespaceGET_FREESPACEReturns the amount of free space in a file
H5FgetH5F_info2GET_INFO2Returns global information for a file
H5Pget H5P_fileGET_spaceFILE_strategySPACE_STRATEGYRetrieves the File Space Strategy for a file creation property list
H5Pset H5P_fileSET_spaceFILE_strategySPACE_STRATEGYSets the File Space Strategy for a file creation property list
H5Pget H5P_fileGET_spaceFILE_pageSPACE_sizePAGE_SIZERetrieves the file space page size for paged aggregationH5Pset
H5P_fileSET_spaceFILE_pageSPACE_sizePAGE_SIZESets the file space page size for paged aggregation

...

h5dumpWhen printing the file creation property information for the superblock via the -B option, h5dump includes the block size obtained via H5PgetH5P_fileGET_spaceFILE_pageSPACE_sizePAGE_SIZE.
h5statWhen printing the file space information via the -S option, h5stat includes the block size obtained via H5PgetH5P_fileGET_spaceFILE_pageSPACE_sizePAGE_SIZE.
h5repackThe following options were added to h5repack:

-G FS_PAGESIZE,--fs_pagesize=FS_PAGESIZE enables the file space page size to be changed to FS_PAGESIZE.

-P FS_PERSIST,--fs_persist=FS_PERSIST sets the persisting free space to persist (1) or to not persist (0).

-S FS_STRATEGY, --fs_strategy=FS_STRATEGY sets the file space management strategy.

-T FS_THRESHOLD, --fs_threshold=FS_THRESHOLD sets the free-space section threshold.

 

Anchor
version
version
Differences between HDF5-1.10 vs HDF5-1.8

HDF5-1.10

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.

HDF5-1.8

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.

Anchor
remove
remove
How to Remove the Free Space in an Existing 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.