Unit test avoids creating new contexts unless it needs specific configuration options#5475
Open
Unit test avoids creating new contexts unless it needs specific configuration options#5475
Conversation
…h vanilla shared context
…ng default settings
Member
|
Hmm, on the one hand I'm not sure if we should merge it if the performance gains are not significant (for comparison, on a two-core machine the tests run one order of magnitude faster), but on the other hand this work will be useful when the C API gets fixed to make contexts thread-safe, but if we wait until then we risk bitrotting the PR. |
…-reduce-context-creation
…-reduce-context-creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_candvanilla_context_cppwhich 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_unitshows 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_candvanilla_context_cppfunctions, there is refactoring of theVFSTestSetupclass, splitting it intoVFSTestContextandVFSTempDir.The non-trivial changes live in
test/support/src/{helpers,vfs_helpers}.{cc,h}.TYPE: NO_HISTORY
DESC: Create fewer contexts in tiledb_unit