You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wangbo (via GitHub)" <gi...@apache.org> on 2023/04/13 07:46:42 UTC

[GitHub] [doris] wangbo opened a new pull request, #18635: [improvement](executor) Priority Queue support vruntime

wangbo opened a new pull request, #18635:
URL: https://github.com/apache/doris/pull/18635

   2 mfqs support vruntime
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1508044118

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo merged pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo merged PR #18635:
URL: https://github.com/apache/doris/pull/18635


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1506596700

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] liutang123 commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "liutang123 (via GitHub)" <gi...@apache.org>.
liutang123 commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1165616564


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() const { return this->_queue_level; }
+
+    // 1.3 priority queue's core id
+    void set_core_id(int core_id) { this->_core_id = core_id; }
+    int get_core_id() const { return this->_core_id; }

Review Comment:
   `this` can be omitted.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] hello-stephen commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1506975265

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.96 seconds
    stream load tsv:          423 seconds loaded 74807831229 Bytes, about 168 MB/s
    stream load json:         21 seconds loaded 2358488459 Bytes, about 107 MB/s
    stream load orc:          60 seconds loaded 1101869774 Bytes, about 17 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230413133442_clickbench_pr_128660.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1166368111


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) an ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }

Review Comment:
   warning: method 'get_runtime_ns' can be made const [readability-make-member-function-const]
   
   ```suggestion
       uint64_t get_runtime_ns() const { return this->_runtime; }
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1506801195

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1510595525

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1166365625


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() const { return this->_queue_level; }
+
+    // 1.3 priority queue's core id
+    void set_core_id(int core_id) { this->_core_id = core_id; }
+    int get_core_id() const { return this->_core_id; }

Review Comment:
   I think add ```this```  make it more clear to tell member variables.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1165140093


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() { return this->_queue_level; }

Review Comment:
   warning: method 'get_queue_level' can be made const [readability-make-member-function-const]
   
   ```suggestion
       int get_queue_level() const { return this->_queue_level; }
   ```
   



##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() { return this->_queue_level; }
+
+    // 1.3 priority queue's core id
+    void set_core_id(int core_id) { this->_core_id = core_id; }
+    int get_core_id() { return this->_core_id; }

Review Comment:
   warning: method 'get_core_id' can be made const [readability-make-member-function-const]
   
   ```suggestion
       int get_core_id() const { return this->_core_id; }
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1510595554

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1166365625


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() const { return this->_queue_level; }
+
+    // 1.3 priority queue's core id
+    void set_core_id(int core_id) { this->_core_id = core_id; }
+    int get_core_id() const { return this->_core_id; }

Review Comment:
   I think add this make codes more clear.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #18635:
URL: https://github.com/apache/doris/pull/18635#issuecomment-1508051597

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] liutang123 commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "liutang123 (via GitHub)" <gi...@apache.org>.
liutang123 commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1165617663


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -206,6 +218,15 @@ class PipelineTask {
     PipelineFragmentContext* _fragment_context;
     TaskQueue* _task_queue = nullptr;
 
+    // used for priority queue
+    std::atomic_uint64_t _runtime = 0; // may visit in different thread

Review Comment:
   `PipelineTask`'s _runtime will not be visited by diff threads.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] liutang123 commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

Posted by "liutang123 (via GitHub)" <gi...@apache.org>.
liutang123 commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1165618721


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -206,6 +218,15 @@ class PipelineTask {
     PipelineFragmentContext* _fragment_context;
     TaskQueue* _task_queue = nullptr;
 
+    // used for priority queue
+    std::atomic_uint64_t _runtime = 0; // may visit in different thread

Review Comment:
   And we can uniformly use std::atomic<uint64_t>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org