Skip to content
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

[enhancement](csv_reader)Optimize the reading efficiency of nullable (string) columns. #24698

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

hubgeter
Copy link
Contributor

@hubgeter hubgeter commented Sep 20, 2023

Proposed changes

Issue Number: close #xxx
Optimize the performance of stream load tsv by reducing virtual function calls .
(Optimize read performance of nullable (string) columns by reducing virtual function calls.)
before : 600+ s
after : 560+ s

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@hubgeter hubgeter marked this pull request as ready for review September 20, 2023 12:28
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hubgeter
Copy link
Contributor Author

run clickbench

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.85 seconds
stream load tsv: 611 seconds loaded 74807831229 Bytes, about 116 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17162321648 Bytes

@hubgeter
Copy link
Contributor Author

run clickbench

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.36 seconds
stream load tsv: 594 seconds loaded 74807831229 Bytes, about 120 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.2 seconds inserted 10000000 Rows, about 342K ops/s
storage size: 17162388002 Bytes

@morningman
Copy link
Contributor

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.40% (8016/22025)
Line Coverage: 28.68% (64350/224347)
Region Coverage: 27.58% (33409/121152)
Branch Coverage: 24.24% (17097/70544)
Coverage Report: http://coverage.selectdb-in.cc/coverage/318a4bb17dff2951e529e9c1de34353e99c20e5e_318a4bb17dff2951e529e9c1de34353e99c20e5e/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.86 seconds
stream load tsv: 594 seconds loaded 74807831229 Bytes, about 120 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162331852 Bytes

@@ -335,6 +335,9 @@ Status CsvReader::init_reader(bool is_load) {
} else {
_options.map_key_delim = _params.file_attributes.text_params.mapkv_delimiter[0];
}
if (is_load) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better check again, check if all columns are nullable string, in case that FE planner may change the behavior

@hubgeter
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hubgeter
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hubgeter hubgeter changed the title [enhancement](serde)enhancement serde performance. [enhancement](csv_reader)Optimize the reading efficiency of nullable (string) columns. Sep 21, 2023
@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.41% (8023/22037)
Line Coverage: 28.70% (64446/224562)
Region Coverage: 27.61% (33475/121242)
Branch Coverage: 24.27% (17129/70564)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b91a9afb096ce1bcdfeb63b397cc89cc21d9d74e_b91a9afb096ce1bcdfeb63b397cc89cc21d9d74e/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.9 seconds
stream load tsv: 591 seconds loaded 74807831229 Bytes, about 120 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.9 seconds inserted 10000000 Rows, about 346K ops/s
storage size: 17162385506 Bytes

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 22, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hubgeter
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.39% (8021/22039)
Line Coverage: 28.68% (64418/224592)
Region Coverage: 27.58% (33448/121257)
Branch Coverage: 24.25% (17117/70572)
Coverage Report: http://coverage.selectdb-in.cc/coverage/bd7df1ad0b3e7b0ccb9604a7d16ba245e161a3cd_bd7df1ad0b3e7b0ccb9604a7d16ba245e161a3cd/report/index.html

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.54 seconds
stream load tsv: 562 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17161970118 Bytes

@morningman morningman merged commit 3c99743 into apache:master Sep 22, 2023
xiaokang pushed a commit that referenced this pull request Sep 22, 2023
…(string) columns. (#24698)

Optimize the performance of stream load tsv by reducing virtual function calls .
(Optimize read performance of nullable (string) columns by reducing virtual function calls.)
before : 600+ s
after : 560+ s
@xiaokang xiaokang mentioned this pull request Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.2-merged p0_b reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants