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](stats) Param tune which would get a better balance between execution time and cost #25767

Closed
wants to merge 1 commit into from

Conversation

Kikyou1997
Copy link
Contributor

@Kikyou1997 Kikyou1997 commented Oct 23, 2023

Proposed changes

  1. Change the default parallel execution analyze task to 3, which would reduce 15% - 20% cpu cost and increase the execution time a litle
  2. Use count(1) - count(col1) rather than sum(case when) which could leverage some optimize like read count from tablet metadata directly

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@Kikyou1997 Kikyou1997 force-pushed the tuned branch 2 times, most recently from ee399a9 to dd73dfb Compare October 23, 2023 07:49
@Kikyou1997
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.04 seconds
stream load tsv: 556 seconds loaded 74807831229 Bytes, about 128 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: 33 seconds loaded 861443392 Bytes, about 24 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17161955036 Bytes

@@ -79,7 +79,7 @@ public class StatisticConstants {
public static final int LOAD_RETRY_TIMES = 3;

// union more relation than 512 may cause StackOverFlowException in the future.
Copy link
Contributor

Choose a reason for hiding this comment

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

is there overflow? UNION_ALL_LIMIT is more than 512

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, in fact we could union even ten thousand query according to my test on legacy optimizer

@@ -1766,7 +1766,7 @@ public class Config extends ConfigBase {
* Used to determined how many statistics collection SQL could run simultaneously.
*/
@ConfField
public static int statistics_simultaneously_running_task_num = 5;
public static int statistics_simultaneously_running_task_num = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

we should move all statistics paramters from config into global variables to avoid restart fe.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 27, 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.

@Kikyou1997
Copy link
Contributor Author

pick from #26858

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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants