I am currently working on a proof of concept API for raster weather data using the Go API for tiledb (v0.30.0) with TileDB core v2.24.0. I am attempting to benchmark dense tile reads with and without sm.tile_cache_size set and seeing virtually no difference in stats.
I dug through the available stats and do not see any timers or counters related to cache hits/misses, or obviously-similar stats. How can I confirm that the tile cache is indeed being used?
Fwiw, I have benchmarked with both local file storage and s3 storage, but have not seen improvements with sm.tile_cache_size
set or unset in either scenario.
Here is a sample benchmark stats output for a local read test running on my Apple M3 MacBook Pro:
[
{
"timers": {
"Context.StorageManager.subSubarray.read_load_relevant_rtrees.sum": 0.0122307,
"Context.StorageManager.subSubarray.read_load_relevant_rtrees.avg": 3.24422e-06,
"Context.StorageManager.subSubarray.read_compute_tile_overlap.sum": 0.364395,
"Context.StorageManager.subSubarray.read_compute_tile_overlap.avg": 9.66564e-05,
"Context.StorageManager.subSubarray.read_compute_relevant_tile_overlap.sum": 0.297617,
"Context.StorageManager.subSubarray.read_compute_relevant_tile_overlap.avg": 7.89435e-05,
"Context.StorageManager.subSubarray.compute_relevant_frags.sum": 0.0391469,
"Context.StorageManager.subSubarray.compute_relevant_frags.avg": 1.03838e-05,
"Context.StorageManager.sm_load_fragment_metadata.sum": 0.00187292,
"Context.StorageManager.sm_load_fragment_metadata.avg": 9.85746e-05,
"Context.StorageManager.sm_load_filtered_fragment_uris.sum": 0.000204122,
"Context.StorageManager.sm_load_filtered_fragment_uris.avg": 1.07433e-05,
"Context.StorageManager.sm_load_array_schemas_and_fragment_metadata.sum": 0.00441167,
"Context.StorageManager.sm_load_array_schemas_and_fragment_metadata.avg": 0.000232193,
"Context.StorageManager.sm_load_array_schema_from_uri.sum": 0.00221279,
"Context.StorageManager.sm_load_array_schema_from_uri.avg": 0.000116463,
"Context.StorageManager.sm_load_all_array_schemas.sum": 0.00227133,
"Context.StorageManager.sm_load_all_array_schemas.avg": 0.000119544,
"Context.StorageManager.array_reopen_directory.sum": 0.00207271,
"Context.StorageManager.array_reopen_directory.avg": 0.00011515,
"Context.StorageManager.array_reopen.sum": 0.00650867,
"Context.StorageManager.array_reopen.avg": 0.000361593,
"Context.StorageManager.array_open_read_load_schemas_and_fragment_meta.sum": 0.00442888,
"Context.StorageManager.array_open_read_load_schemas_and_fragment_meta.avg": 0.000233099,
"Context.StorageManager.array_open_read_load_directory.sum": 0.000104,
"Context.StorageManager.array_open_read_load_directory.avg": 0.000104,
"Context.StorageManager.array_open_READ.sum": 0.000322417,
"Context.StorageManager.array_open_READ.avg": 0.000322417,
"Context.StorageManager.VFS.ArrayDirectory.load_consolidated_commit_uris.sum": 1.7414e-05,
"Context.StorageManager.VFS.ArrayDirectory.load_consolidated_commit_uris.avg": 9.16526e-07,
"Context.StorageManager.VFS.ArrayDirectory.list_root_uris.sum": 0.00119288,
"Context.StorageManager.VFS.ArrayDirectory.list_root_uris.avg": 6.2783e-05,
"Context.StorageManager.VFS.ArrayDirectory.list_fragment_meta_uris.sum": 0.000146706,
"Context.StorageManager.VFS.ArrayDirectory.list_fragment_meta_uris.avg": 7.72137e-06,
"Context.StorageManager.VFS.ArrayDirectory.list_commit_uris.sum": 0.00150967,
"Context.StorageManager.VFS.ArrayDirectory.list_commit_uris.avg": 7.94562e-05,
"Context.StorageManager.VFS.ArrayDirectory.list_array_schema_uris.sum": 0.00164917,
"Context.StorageManager.VFS.ArrayDirectory.list_array_schema_uris.avg": 8.67983e-05,
"Context.StorageManager.VFS.ArrayDirectory.list_array_meta_uris.sum": 0.000158751,
"Context.StorageManager.VFS.ArrayDirectory.list_array_meta_uris.avg": 8.35532e-06,
"Context.StorageManager.Subarray.read_compute_tile_coords.sum": 0.00204402,
"Context.StorageManager.Subarray.read_compute_tile_coords.avg": 5.42182e-07,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.sum": 0.230854,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.avg": 6.12345e-05,
"Context.StorageManager.Query.Reader.read_tiles.sum": 0.239003,
"Context.StorageManager.Query.Reader.read_tiles.avg": 6.33961e-05,
"Context.StorageManager.Query.Reader.read_attribute_tiles.sum": 0.241062,
"Context.StorageManager.Query.Reader.read_attribute_tiles.avg": 6.39422e-05,
"Context.StorageManager.Query.Reader.load_tile_var_sizes.sum": 0.00663585,
"Context.StorageManager.Query.Reader.load_tile_var_sizes.avg": 1.76017e-06,
"Context.StorageManager.Query.Reader.load_tile_offsets.sum": 0.00780588,
"Context.StorageManager.Query.Reader.load_tile_offsets.avg": 2.07053e-06,
"Context.StorageManager.Query.Reader.init_state.sum": 0.202428,
"Context.StorageManager.Query.Reader.init_state.avg": 5.36944e-05,
"Context.StorageManager.Query.Reader.dowork.sum": 1.62782,
"Context.StorageManager.Query.Reader.dowork.avg": 0.000431781,
"Context.StorageManager.Query.Reader.copy_fixed_tiles.sum": 0.340567,
"Context.StorageManager.Query.Reader.copy_fixed_tiles.avg": 9.03361e-05,
"Context.StorageManager.Query.Reader.copy_attribute.sum": 0.343155,
"Context.StorageManager.Query.Reader.copy_attribute.avg": 9.10226e-05,
"Context.StorageManager.Query.Reader.apply_query_condition.sum": 7.6298e-05,
"Context.StorageManager.Query.Reader.apply_query_condition.avg": 2.02382e-08,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.sum": 0.647044,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.avg": 0.00017163
},
"counters": {
"Context.StorageManager.subSubarray.precompute_tile_overlap.tile_overlap_byte_size": 241280,
"Context.StorageManager.subSubarray.precompute_tile_overlap.relevant_fragment_num": 3770,
"Context.StorageManager.subSubarray.precompute_tile_overlap.ranges_requested": 3770,
"Context.StorageManager.subSubarray.precompute_tile_overlap.ranges_computed": 3770,
"Context.StorageManager.subSubarray.precompute_tile_overlap.fragment_num": 3770,
"Context.StorageManager.subSubarray.add_range_dim_1": 3770,
"Context.StorageManager.subSubarray.add_range_dim_0": 3770,
"Context.StorageManager.read_unfiltered_byte_num": 5130,
"Context.StorageManager.read_tile_offsets_size": 304,
"Context.StorageManager.read_rtree_size": 152,
"Context.StorageManager.read_frag_meta_size": 9386,
"Context.StorageManager.read_array_schema_size": 4674,
"Context.StorageManager.VFS.read_ops_num": 3979,
"Context.StorageManager.VFS.read_byte_num": 988511005,
"Context.StorageManager.VFS.file_size_num": 19,
"Context.StorageManager.Query.Reader.tiles_unfiltered": 15080,
"Context.StorageManager.Query.Reader.tiles_allocated": 3770,
"Context.StorageManager.Query.Reader.num_tiles_read": 3770,
"Context.StorageManager.Query.Reader.num_tiles": 3770,
"Context.StorageManager.Query.Reader.loop_num": 3770,
"Context.StorageManager.Query.Reader.internal_loop_num": 3770,
"Context.StorageManager.Query.Reader.attr_num": 3770,
"Context.StorageManager.Query.Reader.attr_fixed_num": 3770,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.ranges": 3770,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.found": 3770,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.adjusted_ranges": 3770
}
}
]