summaryrefslogtreecommitdiffstats
path: root/src/H5AC2public.h
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2008-02-18 05:28:04 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2008-02-18 05:28:04 (GMT)
commitcd571e4a45e5af71ae608388141e6b28a16f8171 (patch)
tree27a6b76035cd03c2b13946730225b34f0f03d98d /src/H5AC2public.h
parentd3e926b897b42d27e1c5f8533a8a413c448738e2 (diff)
downloadhdf5-cd571e4a45e5af71ae608388141e6b28a16f8171.zip
hdf5-cd571e4a45e5af71ae608388141e6b28a16f8171.tar.gz
hdf5-cd571e4a45e5af71ae608388141e6b28a16f8171.tar.bz2
[svn-r14594] Ported flash cache size increase code into the journaling branch --
note that both the H5C and H5C2 code have been updated. Also checked in code to track journaling status in the super block. Note that this code has not been tested -- but as best I can tell, it does not break the existing regression tests. Tested serial (debug and production) on Phoenix. Also tested parallel on kagiso. Note that regression test fails on kagiso (but not on phoenix) if the cache2 serial tests are configured to use the core file driver. Thus this code is check in with the core file driver optimization of the cache2 tests disabled. To turn it on, set the USE_CORE_DRIVER #define to TRUE.
Diffstat (limited to 'src/H5AC2public.h')
-rw-r--r--src/H5AC2public.h60
1 files changed, 59 insertions, 1 deletions
diff --git a/src/H5AC2public.h b/src/H5AC2public.h
index 3c88ef1..a16ad2a 100644
--- a/src/H5AC2public.h
+++ b/src/H5AC2public.h
@@ -15,7 +15,7 @@
/*-------------------------------------------------------------------------
*
- * Created: H5ACpublic.h
+ * Created: H5AC2public.h
* Jul 10 1997
* Robb Matzke <matzke@llnl.gov>
*
@@ -208,6 +208,60 @@ extern "C" {
* above, this field contains the maximum number of bytes by which the
* cache size can be increased in a single re-size.
*
+ * flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
+ * type whose value indicates whether and by which algorithm we should
+ * make flash increases in the size of the cache to accomodate insertion
+ * of large entries and large increases in the size of a single entry.
+ *
+ * The addition of the flash increment mode was occasioned by performance
+ * problems that appear when a local heap is increased to a size in excess
+ * of the current cache size. While the existing re-size code dealt with
+ * this eventually, performance was very bad for the remainder of the
+ * epoch.
+ *
+ * At present, there are two possible values for the flash_incr_mode:
+ *
+ * H5C_flash_incr__off: Don't perform flash increases in the size of
+ * the cache.
+ *
+ * H5C_flash_incr__add_space: Let x be either the size of a newly
+ * newly inserted entry, or the number of bytes by which the
+ * size of an existing entry has been increased.
+ *
+ * If
+ * x > flash_threshold * current max cache size,
+ *
+ * increase the current maximum cache size by x * flash_multiple
+ * less any free space in the cache, and star a new epoch. For
+ * now at least, pay no attention to the maximum increment.
+ *
+ * In both of the above cases, the flash increment pays no attention to
+ * the maximum increment (at least in this first incarnation), but DOES
+ * stay within max_size.
+ *
+ * With a little thought, it should be obvious that the above flash
+ * cache size increase algorithm is not sufficient for all circumstances
+ * -- for example, suppose the user round robins through
+ * (1/flash_threshold) +1 groups, adding one data set to each on each
+ * pass. Then all will increase in size at about the same time, requiring
+ * the max cache size to at least double to maintain acceptable
+ * performance, however the above flash increment algorithm will not be
+ * triggered.
+ *
+ * Hopefully, the add space algorithms detailed above will be sufficient
+ * for the performance problems encountered to date. However, we should
+ * expect to revisit the issue.
+ *
+ * flash_multiple: Double containing the multiple described above in the
+ * H5C_flash_incr__add_space section of the discussion of the
+ * flash_incr_mode section. This field is ignored unless flash_incr_mode
+ * is H5C_flash_incr__add_space.
+ *
+ * flash_threshold: Double containing the factor by which current max cache
+ * size is multiplied to obtain the size threshold for the add_space flash
+ * increment algorithm. The field is ignored unless flash_incr_mode is
+ * H5C_flash_incr__add_space.
+ *
*
* Cache size decrease control fields:
*
@@ -364,6 +418,10 @@ typedef struct H5AC2_cache_config_t
hbool_t apply_max_increment;
size_t max_increment;
+ enum H5C2_cache_flash_incr_mode flash_incr_mode;
+ double flash_multiple;
+ double flash_threshold;
+
/* size decrease control fields: */
enum H5C2_cache_decr_mode decr_mode;