Yingchun Lai has posted comments on this change. (
http://gerrit.cloudera.org:8080/14445 )
Change subject: [tablet] Use std::deque instead of std::vector to collect blocks
......................................................................
Patch Set 2:
> Patch Set 1:
>
> (1 comment)
Thanks adar, your suggestions are very helpful!
I did some simple benchmarks, compare std::deque with std::vector and
std::list, which shows that std::vector provides a linear time cost
when block count per RowSet increasing, and a exponential time cost
when RowSet count increasing. And std::list provides a linear time
cost when RowSet count and block count per RowSet increasing, the same with
std::deque, and deque cost less time than list, about half time saved.
Details as follow:
(The first column is test_row_set_count/test_block_count_per_rs,the other
columns show 10 times total tablet_meta_->CollectBlockIds() time cost, in
millisecond)
vector list deque
1000/1000 3464 687 334
2000/1000 15238 1390 647
4000/1000 75139 3057 1392
8000/1000 328808 6593 2805
4000/2000 159517 6488 2965
4000/4000 348471 11967 5513
4000/8000 -(too long) 23706 11704
--
To view, visit http://gerrit.cloudera.org:8080/14445
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7ce853e35eb7dfa9f9a099e465ea8edfaa7c4aa9
Gerrit-Change-Number: 14445
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Comment-Date: Thu, 14 Nov 2019 03:35:13 +0000
Gerrit-HasComments: No