Unit test avoids creating new contexts unless it needs specific configuration options #5475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was at attempt at SC-63578. Performance results indicated that more vCPUs correlates negatively with performance. We speculated that this was because of the time required to spawn and join threads for each context. This branch reduces the number of contexts created by adding functions
vanilla_context_c
andvanilla_context_cpp
which return an existing Context for unit tests which don't need any special configuration.Ultimately this does not appear to be the cause of the negative correlation.
time ./tiledb_unit
shows that this branch runs in just under 21 minutes instead of just over 22 on a large EC2 instance with 96 vCPUs, which is only a 5% improvement. That's nothing to write home about, but the work is already done, so we might as well take it.In addition to the
vanilla_context_c
andvanilla_context_cpp
functions, there is refactoring of theVFSTestSetup
class, splitting it intoVFSTestContext
andVFSTempDir
.The non-trivial changes live in
test/support/src/{helpers,vfs_helpers}.{cc,h}
.TYPE: NO_HISTORY
DESC: Create fewer contexts in tiledb_unit