Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5  1.14.4.3
API Reference
 
Loading...
Searching...
No Matches
H5AC_cache_config_t Struct Reference

#include <src/H5ACpublic.h>

Detailed Description

H5AC_cache_config_t is a public structure intended for use in public APIs. At least in its initial incarnation, it is basically a copy of struct H5C_auto_size_ctl_t, minus the report_fcn field, and plus the dirty_bytes_threshold field.

The report_fcn field is omitted, as including it would require us to make H5C_t structure public.

The dirty_bytes_threshold field does not appear in H5C_auto_size_ctl_t, as synchronization between caches on different processes is handled at the H5AC level, not at the level of H5C. Note however that there is considerable interaction between this value and the other fields in this structure.

Similarly, the open_trace_file, close_trace_file, and trace_file_name fields do not appear in H5C_auto_size_ctl_t, as most trace file issues are handled at the H5AC level. The one exception is storage of the pointer to the trace file, which is handled by H5C.

The structure is in H5ACpublic.h as we may wish to allow different configuration options for metadata and raw data caches.

Data Fields

int version
 
hbool_t rpt_fcn_enabled
 
hbool_t open_trace_file
 
hbool_t close_trace_file
 
char trace_file_name [1024+1]
 
hbool_t evictions_enabled
 
hbool_t set_initial_size
 
size_t initial_size
 
double min_clean_fraction
 
size_t max_size
 
size_t min_size
 
long int epoch_length
 
enum H5C_cache_incr_mode incr_mode
 
double lower_hr_threshold
 
double increment
 
hbool_t apply_max_increment
 
size_t max_increment
 
enum H5C_cache_flash_incr_mode flash_incr_mode
 
double flash_multiple
 
double flash_threshold
 
enum H5C_cache_decr_mode decr_mode
 
double upper_hr_threshold
 
double decrement
 
hbool_t apply_max_decrement
 
size_t max_decrement
 
int epochs_before_eviction
 
hbool_t apply_empty_reserve
 
double empty_reserve
 
size_t dirty_bytes_threshold
 
int metadata_write_strategy
 

Field Documentation

◆ apply_empty_reserve

hbool_t apply_empty_reserve

Boolean flag indicating whether the ageout based decrement algorithms will maintain a empty reserve when decreasing cache size.

◆ apply_max_decrement

hbool_t apply_max_decrement

Boolean flag indicating ether an upper limit should be applied to the size of cache size decreases.

◆ apply_max_increment

hbool_t apply_max_increment

Boolean flag indicating whether an upper limit should be applied to the size of cache size increases.

◆ close_trace_file

hbool_t close_trace_file

Boolean field indicating whether the current trace file (if any) should be closed.
See the above comments on the open_trace_file field. This field should be set to 0 unless there is an open trace file on the cache that you wish to close.
The trace file feature is unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to collect a trace of cache activity in cases of occult failures and/or poor performance seen in the field, so as to aid in reproduction in the lab. If you use it absent the direction of The HDF Group, you are on your own.

◆ decr_mode

enum H5C_cache_decr_mode decr_mode

Enumerated value indicating the operational mode of the tomatic cache size decrease code. At present, the values listed in H5C_cache_decr_mode are legal.

◆ decrement

double decrement

In the hit rate threshold cache size decrease algorithm, this parameter contains the factor by which the current max cache size is multiplied to produce a tentative new cache size.
The actual cache size decrease will be clipped to satisfy the min_size specified in the general configuration, and possibly max_decrement.
The parameter must be be in the interval [0.0, 1.0].
If you set it to 1.0, you will effectively disable cache size decreases. 0.9 is a reasonable starting point.

◆ dirty_bytes_threshold

size_t dirty_bytes_threshold

Threshold number of bytes of dirty metadata generation for triggering synchronizations of the metadata caches serving the target file in the parallel case.
Synchronization occurs whenever the number of bytes of dirty metadata created since the last synchronization exceeds this limit.
This field only applies to the parallel case. While it is ignored elsewhere, it can still draw a value out of bounds error.
It must be consistent across all caches on any given file.
By default, this field is set to 256 KB. It shouldn't be more than half the current max cache size times the min clean fraction.

◆ empty_reserve

double empty_reserve

Empty reserve as a fraction maximum cache size if applicable.
When so directed, the ageout based algorithms will not decrease the maximum cache size unless the empty reserve can be met.
The parameter must lie in the interval [0.0, 1.0]. 0.1 or 0.05 is a good place to start.

◆ epoch_length

long int epoch_length

Number of cache accesses between runs of the adaptive cache resize code. 50,000 is a good starting number.

◆ epochs_before_eviction

int epochs_before_eviction

In the ageout based cache size reduction algorithms, this field contains the minimum number of epochs an entry must remain unaccessed in cache before the cache size reduction algorithm tries to evict it. 3 is a reasonable value.

◆ evictions_enabled

hbool_t evictions_enabled

A boolean flag indicating whether evictions from the metadata cache are enabled. This flag is initially set to enabled (1).
In rare circumstances, the raw data throughput quirements may be so high that the user wishes to postpone metadata writes so as to reserve I/O throughput for raw data. The evictions_enabled field exists to allow this. However, this is an extreme step, and you have no business doing it unless you have read the User Guide section on metadata caching, and have considered all other options carefully.
The evictions_enabled field may not be set to disabled (0) unless all adaptive cache resizing code is disabled via the incr_mode, flash_incr_mode, decr_mode fields.
When this flag is set to disabled (0), the metadata cache will not attempt to evict entries to make space for new entries, and thus will grow without bound.
Evictions will be re-enabled when this field is set back to 1. This should be done as soon as possible.

◆ flash_incr_mode

enum H5C_cache_flash_incr_mode flash_incr_mode

Enumerated value indicating the operational mode of the flash cache size increase code. At present, only two listed values in H5C_cache_flash_incr_mode are legal.

◆ flash_multiple

double flash_multiple

The factor by which the size of the triggering entry / entry size increase is multiplied to obtain the initial cache size increment. This increment may be reduced to reflect existing free space in the cache and the max_size field above.
The parameter must lie in the interval [0.0, 1.0]. 0.1 or 0.05 is a good place to start.
At present, this field must lie in the range [0.1, 10.0].

◆ flash_threshold

double flash_threshold

The factor by which the current maximum cache size is multiplied to obtain the minimum size entry / entry size increase which may trigger a flash cache size increase.
At present, this value must lie in the range [0.1, 1.0].

◆ incr_mode

enum H5C_cache_incr_mode incr_mode

Enumerated value indicating the operational mode of the automatic cache size increase code. At present, only two values listed in H5C_cache_incr_mode are legal.

◆ increment

double increment

Factor by which the hit rate threshold cache size increment algorithm multiplies the current cache max size to obtain a tentative new cache size.
The actual cache size increase will be clipped to satisfy the max_size specified in the general configuration, and possibly max_increment below.
The parameter must be greater than or equal to 1.0 – 2.0 is a reasonable value.
If you set it to 1.0, you will effectively disable cache size increases.

◆ initial_size

size_t initial_size

If set_initial_size is set to 1, initial_size must contain he desired initial size in bytes. This value must lie in the closed interval [ min_size, max_size ]. (see below)

◆ lower_hr_threshold

double lower_hr_threshold

Hit rate threshold used by the hit rate threshold cache size increment algorithm.
When the hit rate over an epoch is below this threshold and the cache is full, the maximum size of the cache is multiplied by increment (below), and then clipped as necessary to stay within max_size, and possibly max_increment.
This field must lie in the interval [0.0, 1.0]. 0.8 or 0.9 is a good place to start.

◆ max_decrement

size_t max_decrement

Maximum number of bytes by which the maximum cache size can be decreased in any single step – if applicable.

◆ max_increment

size_t max_increment

Maximum number of bytes by which cache size can be increased in a single step – if applicable.

◆ max_size

size_t max_size

Upper bound (in bytes) on the range of values that the adaptive cache resize code can select as the maximum cache size.

◆ metadata_write_strategy

int metadata_write_strategy

Desired metadata write strategy. The valid values for this field are:
H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies the only process zero is allowed to write dirty metadata to disk.
H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: Specifies that process zero still makes the decisions as to what entries should be flushed, but the actual flushes are distributed across the processes in the computation to the extent possible.
The src/H5ACpublic.h include file in the HDF5 library has detailed information on each strategy.

◆ min_clean_fraction

double min_clean_fraction

This field specifies the minimum fraction of the cache that must be kept either clean or empty.
The value must lie in the interval [0.0, 1.0]. 0.01 is a good place to start in the serial case. In the parallel case, a larger value is needed – see the overview of the metadata cache in the “Metadata Caching in HDF5” section of the – HDF5 User Guide for details.

◆ min_size

size_t min_size

Lower bound (in bytes) on the range of values that the adaptive cache resize code can select as the minimum cache * size.

◆ open_trace_file

hbool_t open_trace_file

Boolean field indicating whether the trace_file_name field should be used to open a trace file for the cache.
The trace file is a debugging feature that allows the capture of top level metadata cache requests for purposes of debugging and/or optimization. This field should normally be set to 0, as trace file collection imposes considerable overhead.
This field should only be set to 1 when the trace_file_name contains the full path of the desired trace file, and either there is no open trace file on the cache, or the close_trace_file field is also 1.
The trace file feature is unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to collect a trace of cache activity in cases of occult failures and/or poor performance seen in the field, so as to aid in reproduction in the lab. If you use it absent the direction of The HDF Group, you are on your own.

◆ rpt_fcn_enabled

hbool_t rpt_fcn_enabled

Boolean flag indicating whether the adaptive cache resize report function is enabled. This field should almost always be set to disabled (0). Since resize algorithm activity is reported via stdout, it MUST be set to disabled (0) on Windows machines.
The report function is not supported code, and can be expected to change between versions of the library. Use it at your own risk.

◆ set_initial_size

hbool_t set_initial_size

Boolean flag indicating whether the cache should be created with a user specified initial size.

◆ trace_file_name

char trace_file_name[1024+1]

Full path of the trace file to be opened if the open_trace_file field is set to 1.
In the parallel case, an ascii representation of the MPI rank of the process will be appended to the file name to yield a unique trace file name for each process.
The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN characters.
The trace file feature is unsupported unless used at the direction of The HDF Group. It is intended to allow The HDF Group to collect a trace of cache activity in cases of occult failures and/or poor performance seen in the field, so as to aid in reproduction in the lab. If you use it absent the direction of The HDF Group, you are on your own.

◆ upper_hr_threshold

double upper_hr_threshold

Hit rate threshold for the hit rate threshold and ageout with hit rate threshold cache size decrement algorithms.
When decr_mode is H5C_decr__threshold, and the hit rate over a given epoch exceeds the supplied threshold, the current maximum cache size is multiplied by decrement to obtain a tentative new (and smaller) maximum cache size.
When decr_mode is H5C_decr__age_out_with_threshold, there is no attempt to find and evict aged out entries unless the hit rate in the previous epoch exceeded the supplied threshold.
This field must lie in the interval [0.0, 1.0].
For H5C_incr__threshold, .9995 or .99995 is a good place to start.
For H5C_decr__age_out_with_threshold, .999 might be more useful.

◆ version

int version

Integer field indicating the version of the H5AC_cache_config_t in use. This field should be set to H5AC__CURR_CACHE_CONFIG_VERSION (defined in H5ACpublic.h).


The documentation for this struct was generated from the following file: