Hi @stavros, thanks for your reply!
Sorry for my late response, somehow I managed to both skip your reply and got forum message to stuck in spam folder 
Also I can’t explain why I thought that slice 2356:4712 was less than 2000 (I’ve set 2000 ** 3 size considering it is slightly larger than the slice size (facepalm) ). But later on I’ve tried to set it up to 20GB and still didn’t see any significant improvements (on a level of benchmark duration dispersion).
I indeed didn’t try to set both py.init_buffer_bytes
and sm.memory_budget
values to be high enough. And also I didn’t notice that setting sm.memory_budget
to sufficient values (80GB) indeed decreases bandwidth utilization fragmentation. Yet still there are now 2 fragments (" > TileDB-Py retry count: 1" in logs, presented below) in bandwidth utilization plot. And as far as I managed to see till now, there is no noticeable time improvements from changing py.init_buffer_bytes
values to 12-20-50Gb. I’ve checked both cases of compressed (gzip lvl 4) and uncompressed dataset in S3 compatible storage. And the CPU resources consumption is still the same in between the bandwidth utilization fragments: half of the gap with high (~50% of available CPU resources) CPU consumption and the other half with ~100%CPU in top (1/80 cores). As far as I understand the first fraction is decompression and the later one is some memory allocations. The sm.memory_budget
increase gives ~ 10% max performance gain (~5s/ 50s).
I’m not sure how should the py.init_buffer_bytes
value be set. Could it be that the updated value is used only if I set it when constructing config with:
config = tiledb.Config({'py.init_buffer_bytes': '50000000000' })
Is it possible to set this parameter like any other Configuration Parameters? Tried the both approaches, yet no observable effect.
Thus I didn’t manage to get > TileDB-Py retry count: 0
yet. I’ll try to run a few more experiments tomorrow.
Could it be that it is worth changing other Configuration Parameters from default values (for example sm.tile_cache_size
or sm.sub_partitioner_memory_budget
)? Tried, no profit yet…
Is it theoretically possible to get completely overlay CPU usage for decompression and reordering with network transfer on current versions? Is it worth reproducing this test scenario with other API (say C API)?
By the way I’m not sure if it is a type or just not implemented in Python API: in Configuration Parameters there are a few default value examples with GB literal suffix, yet it didn’t work for me (for example sm.memory_budget
value). In my tests I’ve already bumped a few times on a strange results due to some typo in cofiguration parameter keywords (due to the fact that unknown parameters are ommited silently). Hope all this ruckus with this entire topic is not due to some silly bug of mine
.
Here are Statistics dumps:
with sm.memory_budget = 90 GB:
INFO:root:strat reading dataset fraction
INFO:root:stopped reading dataset fraction
TileDB Embedded Version: (2, 3, 0)
TileDB-Py Version: 0.9.0
[
{
"timers": {
"Context.StorageManager.read_load_frag_meta.sum": 0.0901656,
"Context.StorageManager.read_load_frag_meta.avg": 0.0901656,
"Context.StorageManager.read_load_consolidated_frag_meta.sum": 8.67e-07,
"Context.StorageManager.read_load_consolidated_frag_meta.avg": 8.67e-07,
"Context.StorageManager.read_load_array_schema.sum": 0.0434217,
"Context.StorageManager.read_load_array_schema.avg": 0.0434217,
"Context.StorageManager.read_get_fragment_uris.sum": 0.0364878,
"Context.StorageManager.read_get_fragment_uris.avg": 0.0364878,
"Context.StorageManager.read_array_open_without_fragments.sum": 0.0434408,
"Context.StorageManager.read_array_open_without_fragments.avg": 0.0434408,
"Context.StorageManager.read_array_open.sum": 0.133638,
"Context.StorageManager.read_array_open.avg": 0.133638,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.sum": 4.30799,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.avg": 2.154,
"Context.StorageManager.Query.Reader.read.sum": 42.2883,
"Context.StorageManager.Query.Reader.read.avg": 21.1441,
"Context.StorageManager.Query.Reader.init_state.sum": 2.3553e-05,
"Context.StorageManager.Query.Reader.init_state.avg": 2.3553e-05,
"Context.StorageManager.Query.Reader.copy_fixed_attr_values.sum": 2.54162,
"Context.StorageManager.Query.Reader.copy_fixed_attr_values.avg": 1.27081,
"Context.StorageManager.Query.Reader.copy_attr_values.sum": 26.8776,
"Context.StorageManager.Query.Reader.copy_attr_values.avg": 13.4388,
"Context.StorageManager.Query.Reader.compute_sparse_result_tiles.sum": 8.724e-06,
"Context.StorageManager.Query.Reader.compute_sparse_result_tiles.avg": 4.362e-06,
"Context.StorageManager.Query.Reader.compute_sparse_result_cell_slabs_dense.sum": 15.2822,
"Context.StorageManager.Query.Reader.compute_sparse_result_cell_slabs_dense.avg": 7.64112,
"Context.StorageManager.Query.Reader.compute_result_coords.sum": 4.0085e-05,
"Context.StorageManager.Query.Reader.compute_result_coords.avg": 2.00425e-05,
"Context.StorageManager.Query.Reader.attr_tiles.sum": 13.5855,
"Context.StorageManager.Query.Reader.attr_tiles.avg": 6.79274,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.sum": 0.0230381,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.avg": 0.0115191,
"Context.StorageManager.Query.Reader.Subarray.read_load_relevant_rtrees.sum": 0.0462501,
"Context.StorageManager.Query.Reader.Subarray.read_load_relevant_rtrees.avg": 0.0154167,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_overlap.sum": 0.0755613,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_overlap.avg": 0.0188903,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_coords.sum": 0.000398737,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_coords.avg": 0.000199368,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_tile_overlap.sum": 0.024966,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_tile_overlap.avg": 0.00832199,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_frags.sum": 0.00408449,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_frags.avg": 0.0013615,
"Context.StorageManager.Query.Reader.Subarray.read_compute_est_result_size.sum": 0.0804848,
"Context.StorageManager.Query.Reader.Subarray.read_compute_est_result_size.avg": 0.016097
},
"counters": {
"Context.StorageManager.read_unfiltered_byte_num": 20875,
"Context.StorageManager.read_tile_offsets_size": 20560,
"Context.StorageManager.read_rtree_size": 80,
"Context.StorageManager.read_frag_meta_size": 6346,
"Context.StorageManager.read_array_schema_size": 235,
"Context.StorageManager.VFS.read_ops_num": 537,
"Context.StorageManager.VFS.read_byte_num": 5327029130,
"Context.StorageManager.Query.Reader.result_num": 9424000000,
"Context.StorageManager.Query.Reader.read_unfiltered_byte_num": 11000000000,
"Context.StorageManager.Query.Reader.overlap_tile_num": 704,
"Context.StorageManager.Query.Reader.loop_num": 2,
"Context.StorageManager.Query.Reader.cell_num": 11000000000,
"Context.StorageManager.Query.Reader.attr_fixed_num": 2,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.not_found": 1,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.fixed_result_size_overflow": 1,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.tile_overlap_cache_hit": 1,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.tile_overlap_byte_size": 10800,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.relevant_fragment_num": 21,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.ranges_requested": 3,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.ranges_computed": 3,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.fragment_num": 57
}
}
]
==== Python Stats ====
* Total TileDB query time: 48.496
> TileDB Core initial query submit time: 20.9982
> TileDB Core incomplete retry time: 27.4385
> TileDB-Py buffer update time: 6.14815
> TileDB-Py retry count: 1
with sm.memory_budget
= 90 GB, py.init_buffer_bytes
= 40GB
INFO:root:strat reading dataset fraction
INFO:root:stopped reading dataset fraction
TileDB Embedded Version: (2, 3, 0)
TileDB-Py Version: 0.9.0
[
{
"timers": {
"Context.StorageManager.read_load_frag_meta.sum": 0.0904538,
"Context.StorageManager.read_load_frag_meta.avg": 0.0904538,
"Context.StorageManager.read_load_consolidated_frag_meta.sum": 9.8e-07,
"Context.StorageManager.read_load_consolidated_frag_meta.avg": 9.8e-07,
"Context.StorageManager.read_load_array_schema.sum": 0.0324673,
"Context.StorageManager.read_load_array_schema.avg": 0.0324673,
"Context.StorageManager.read_get_fragment_uris.sum": 0.0323795,
"Context.StorageManager.read_get_fragment_uris.avg": 0.0323795,
"Context.StorageManager.read_array_open_without_fragments.sum": 0.0324861,
"Context.StorageManager.read_array_open_without_fragments.avg": 0.0324861,
"Context.StorageManager.read_array_open.sum": 0.123026,
"Context.StorageManager.read_array_open.avg": 0.123026,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.sum": 3.23723,
"Context.StorageManager.Query.Reader.unfilter_attr_tiles.avg": 1.61861,
"Context.StorageManager.Query.Reader.read.sum": 40.9202,
"Context.StorageManager.Query.Reader.read.avg": 20.4601,
"Context.StorageManager.Query.Reader.init_state.sum": 3.5258e-05,
"Context.StorageManager.Query.Reader.init_state.avg": 3.5258e-05,
"Context.StorageManager.Query.Reader.copy_fixed_attr_values.sum": 1.56068,
"Context.StorageManager.Query.Reader.copy_fixed_attr_values.avg": 0.780338,
"Context.StorageManager.Query.Reader.copy_attr_values.sum": 25.1186,
"Context.StorageManager.Query.Reader.copy_attr_values.avg": 12.5593,
"Context.StorageManager.Query.Reader.compute_sparse_result_tiles.sum": 6.746e-06,
"Context.StorageManager.Query.Reader.compute_sparse_result_tiles.avg": 3.373e-06,
"Context.StorageManager.Query.Reader.compute_sparse_result_cell_slabs_dense.sum": 15.6888,
"Context.StorageManager.Query.Reader.compute_sparse_result_cell_slabs_dense.avg": 7.84439,
"Context.StorageManager.Query.Reader.compute_result_coords.sum": 3.0513e-05,
"Context.StorageManager.Query.Reader.compute_result_coords.avg": 1.52565e-05,
"Context.StorageManager.Query.Reader.attr_tiles.sum": 14.1831,
"Context.StorageManager.Query.Reader.attr_tiles.avg": 7.09156,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.sum": 0.0211147,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.read_next_partition.avg": 0.0105574,
"Context.StorageManager.Query.Reader.Subarray.read_load_relevant_rtrees.sum": 0.0657873,
"Context.StorageManager.Query.Reader.Subarray.read_load_relevant_rtrees.avg": 0.0219291,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_overlap.sum": 0.0942775,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_overlap.avg": 0.0235694,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_coords.sum": 0.000285052,
"Context.StorageManager.Query.Reader.Subarray.read_compute_tile_coords.avg": 0.000142526,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_tile_overlap.sum": 0.0248198,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_tile_overlap.avg": 0.00827326,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_frags.sum": 0.00347886,
"Context.StorageManager.Query.Reader.Subarray.read_compute_relevant_frags.avg": 0.00115962,
"Context.StorageManager.Query.Reader.Subarray.read_compute_est_result_size.sum": 0.0986528,
"Context.StorageManager.Query.Reader.Subarray.read_compute_est_result_size.avg": 0.0197306
},
"counters": {
"Context.StorageManager.read_unfiltered_byte_num": 20875,
"Context.StorageManager.read_tile_offsets_size": 20560,
"Context.StorageManager.read_rtree_size": 80,
"Context.StorageManager.read_frag_meta_size": 6346,
"Context.StorageManager.read_array_schema_size": 235,
"Context.StorageManager.VFS.read_ops_num": 537,
"Context.StorageManager.VFS.read_byte_num": 5327029130,
"Context.StorageManager.Query.Reader.result_num": 9424000000,
"Context.StorageManager.Query.Reader.read_unfiltered_byte_num": 11000000000,
"Context.StorageManager.Query.Reader.overlap_tile_num": 704,
"Context.StorageManager.Query.Reader.loop_num": 2,
"Context.StorageManager.Query.Reader.cell_num": 11000000000,
"Context.StorageManager.Query.Reader.attr_fixed_num": 2,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.not_found": 1,
"Context.StorageManager.Query.Reader.SubarrayPartitioner.compute_current_start_end.fixed_result_size_overflow": 1,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.tile_overlap_cache_hit": 1,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.tile_overlap_byte_size": 10800,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.relevant_fragment_num": 21,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.ranges_requested": 3,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.ranges_computed": 3,
"Context.StorageManager.Query.Reader.Subarray.precompute_tile_overlap.fragment_num": 57
}
}
]
==== Python Stats ====
* Total TileDB query time: 47.1339
> TileDB Core initial query submit time: 20.818
> TileDB Core incomplete retry time: 26.2365
> TileDB-Py buffer update time: 6.13405
> TileDB-Py retry count: 1
Thanks for your assistance in advance!
Dmitriy