-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize copy_cells
, part 2
#1695
Merged
Merged
Conversation
This file contains 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
joe-maley
force-pushed
the
jpm/copy-cells-perf-2
branch
2 times, most recently
from
June 22, 2020 18:45
1395b81
to
691d1c8
Compare
stavrospapadopoulos
approved these changes
Jun 22, 2020
joe-maley
force-pushed
the
jpm/copy-cells-perf-2
branch
from
June 23, 2020 11:11
691d1c8
to
e563a5d
Compare
This patch optimizes the `copy_cells` path for multi-fragment reads. The following benchmarks are for the multi-fragment read scenario discussed offline: ``` // Current Read time: 4.75082 secs * Time to copy result attribute values: 3.54192 secs > Time to read attribute tiles: 0.311707 secs > Time to unfilter attribute tiles: 0.370434 secs > Time to copy fixed-sized attribute values: 0.898421 secs > Time to copy var-sized attribute values: 0.954925 secs ``` ``` // With this patch Read time: 3.04627 secs * Time to copy result attribute values: 1.83972 secs > Time to read attribute tiles: 0.274928 secs > Time to unfilter attribute tiles: 0.38196 secs > Time to copy fixed-sized attribute values: 0.517415 secs > Time to copy var-sized attribute values: 0.461847 secs ``` For context, here are the benchmark results for the single-fragment read. The stats are similar with and without this patch: ``` Read time: 1.86883 secs * Time to copy result attribute values: 1.19411 secs > Time to read attribute tiles: 0.304055 secs > Time to unfilter attribute tiles: 0.351332 secs > Time to copy fixed-sized attribute values: 0.289661 secs > Time to copy var-sized attribute values: 0.142405 secs ``` This patch does three things: 1. Converts the `offset_offsets_per_cs` and `var_offsets_per_cs` in the var-sized path from a 2D array (vector<vector<uint64_t>>) to a 1D array (vector<uint64_t). The big win is construction and destruction time for the nested vector elements. 2. Partitions cell copying for both fixed and var-sized paths. The motivation is to reduce contention on the TBB threads and minimize time spent context switching between the individual cell slab copies. 3. Added a context cache for the fixed size path, similar to the existing var-sized context cache.
joe-maley
force-pushed
the
jpm/copy-cells-perf-2
branch
from
June 23, 2020 13:18
e563a5d
to
7b76473
Compare
joe-maley
pushed a commit
that referenced
this pull request
Jul 22, 2020
This patch optimizes the `copy_cells` path for multi-fragment reads. The following benchmarks are for the multi-fragment read scenario discussed offline: ``` // Current Read time: 4.75082 secs * Time to copy result attribute values: 3.54192 secs > Time to read attribute tiles: 0.311707 secs > Time to unfilter attribute tiles: 0.370434 secs > Time to copy fixed-sized attribute values: 0.898421 secs > Time to copy var-sized attribute values: 0.954925 secs ``` ``` // With this patch Read time: 3.04627 secs * Time to copy result attribute values: 1.83972 secs > Time to read attribute tiles: 0.274928 secs > Time to unfilter attribute tiles: 0.38196 secs > Time to copy fixed-sized attribute values: 0.517415 secs > Time to copy var-sized attribute values: 0.461847 secs ``` For context, here are the benchmark results for the single-fragment read. The stats are similar with and without this patch: ``` Read time: 1.86883 secs * Time to copy result attribute values: 1.19411 secs > Time to read attribute tiles: 0.304055 secs > Time to unfilter attribute tiles: 0.351332 secs > Time to copy fixed-sized attribute values: 0.289661 secs > Time to copy var-sized attribute values: 0.142405 secs ``` This patch does three things: 1. Converts the `offset_offsets_per_cs` and `var_offsets_per_cs` in the var-sized path from a 2D array (vector<vector<uint64_t>>) to a 1D array (vector<uint64_t). The big win is construction and destruction time for the nested vector elements. 2. Partitions cell copying for both fixed and var-sized paths. The motivation is to reduce contention on the TBB threads and minimize time spent context switching between the individual cell slab copies. 3. Added a context cache for the fixed size path, similar to the existing var-sized context cache. Co-authored-by: Joe Maley <[email protected]>
Shelnutt2
pushed a commit
that referenced
this pull request
Jul 22, 2020
This patch optimizes the `copy_cells` path for multi-fragment reads. The following benchmarks are for the multi-fragment read scenario discussed offline: ``` // Current Read time: 4.75082 secs * Time to copy result attribute values: 3.54192 secs > Time to read attribute tiles: 0.311707 secs > Time to unfilter attribute tiles: 0.370434 secs > Time to copy fixed-sized attribute values: 0.898421 secs > Time to copy var-sized attribute values: 0.954925 secs ``` ``` // With this patch Read time: 3.04627 secs * Time to copy result attribute values: 1.83972 secs > Time to read attribute tiles: 0.274928 secs > Time to unfilter attribute tiles: 0.38196 secs > Time to copy fixed-sized attribute values: 0.517415 secs > Time to copy var-sized attribute values: 0.461847 secs ``` For context, here are the benchmark results for the single-fragment read. The stats are similar with and without this patch: ``` Read time: 1.86883 secs * Time to copy result attribute values: 1.19411 secs > Time to read attribute tiles: 0.304055 secs > Time to unfilter attribute tiles: 0.351332 secs > Time to copy fixed-sized attribute values: 0.289661 secs > Time to copy var-sized attribute values: 0.142405 secs ``` This patch does three things: 1. Converts the `offset_offsets_per_cs` and `var_offsets_per_cs` in the var-sized path from a 2D array (vector<vector<uint64_t>>) to a 1D array (vector<uint64_t). The big win is construction and destruction time for the nested vector elements. 2. Partitions cell copying for both fixed and var-sized paths. The motivation is to reduce contention on the TBB threads and minimize time spent context switching between the individual cell slab copies. 3. Added a context cache for the fixed size path, similar to the existing var-sized context cache. Co-authored-by: Joe Maley <[email protected]>
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 patch optimizes the
copy_cells
path for multi-fragment reads. Thefollowing benchmarks are for the multi-fragment read scenario discussed
offline:
For context, here are the benchmark results for the single-fragment read. The
stats are similar with and without this patch:
This patch does three things:
offset_offsets_per_cs
andvar_offsets_per_cs
in the var-sizedpath from a 2D array (vector<vector<uint64_t>>) to a 1D array (vector<uint64_t).
The big win is construction and destruction time for the nested vector
elements.
is to reduce contention on the TBB threads and minimize time spent context
switching between the individual cell slab copies.
var-sized context cache.