You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/08 12:26:16 UTC

[GitHub] [incubator-doris] caiconghui opened a new pull request #6397: [Optimize] Support send batch parallelism for olap table sink

caiconghui opened a new pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397


   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## 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...
   


-- 
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] [incubator-doris] caiconghui merged pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
caiconghui merged pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397


   


-- 
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] [incubator-doris] caiconghui edited a comment on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
caiconghui edited a comment on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-903682565


   > How much is this performance improvement?
   
   This is the first step to speed up olap table sink. and the bottleneck for olaptable sink is still need to be deep solved.
   I make a test in my environment with 5 node in cluster, query_timeout is 300
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   ERROR 5024 (HY000): errCode = 2, detailMessage = Execute timeout
   MySQL [test]> set send_batch_parallelism=1;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> set send_batch_parallelism=5;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   Query OK, 84272656 rows affected (3 min 24.68 sec)
   {'label':'insert_a88e439072c74d4b-927690bb54979af0', 'status':'VISIBLE', 'txnId':'76736'}


-- 
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] [incubator-doris] caiconghui edited a comment on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
caiconghui edited a comment on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-903682565


   > How much is this performance improvement?
   
   This is the first step to speed up olap table sink. and the bottleneck for olaptable sink is still need to be deep solved.
   I make a test in my environment with 5 node in cluster
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   ERROR 5024 (HY000): errCode = 2, detailMessage = Execute timeout
   MySQL [test]> set send_batch_parallelism=1;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> set send_batch_parallelism=5;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   Query OK, 84272656 rows affected (3 min 24.68 sec)
   {'label':'insert_a88e439072c74d4b-927690bb54979af0', 'status':'VISIBLE', 'txnId':'76736'}


-- 
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] [incubator-doris] caiconghui commented on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
caiconghui commented on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-903682565


   > How much is this performance improvement?
   
   This is the first step you speed up olap table sink. and the bottleneck for olaptable sink is still need to be deep solved.
   I make a test in my environment with 5 node in cluster
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   ERROR 5024 (HY000): errCode = 2, detailMessage = Execute timeout
   MySQL [test]> set send_batch_parallelism=1;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> set send_batch_parallelism=5;
   Query OK, 0 rows affected (0.00 sec)
   
   MySQL [test]> insert into info_p1 select * from info_p1;
   Query OK, 84272656 rows affected (3 min 24.68 sec)
   {'label':'insert_a88e439072c74d4b-927690bb54979af0', 'status':'VISIBLE', 'txnId':'76736'}


-- 
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] [incubator-doris] morningman commented on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-895010915


   How much is this performance improvement?


-- 
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] [incubator-doris] morningman commented on a change in pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#discussion_r697794130



##########
File path: be/src/common/config.h
##########
@@ -621,6 +621,17 @@ CONF_mDouble(tablet_version_graph_orphan_vertex_ratio, "0.1");
 // else we will call sync method
 CONF_mBool(runtime_filter_use_async_rpc, "true");
 
+// max send batch parallelism for OlapTableSink
+// The value set by the user for send_batch_parallelism is not allowed to exceed max_send_batch_parallelism,
+// if exceed, the value of send_batch_parallelism would be max_send_batch_parallelism
+CONF_mInt32(max_send_batch_parallelism, "1");
+CONF_Validator(max_send_batch_parallelism, [](const int config) -> bool { return config >= 1; });
+
+// number of send batch thread pool size
+CONF_Int32(doris_send_batch_thread_pool_thread_num, "256");

Review comment:
       Too large as a default value? How about -1 by default and using half of cpu core?

##########
File path: be/src/exec/tablet_sink.h
##########
@@ -410,10 +417,11 @@ class OlapTableSink : public DataSink {
     // the timeout of load channels opened by this tablet sink. in second
     int64_t _load_channel_timeout_s = 0;
 
-    // True if this sink has been closed once
-    bool _is_closed = false;
-    // Save the status of close() method
-    Status _close_status;
+    int32_t _send_batch_parallelism = 1;
+	// True if this sink has been closed once
+	bool _is_closed = false;

Review comment:
       use space instead of tab




-- 
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] [incubator-doris] github-actions[bot] commented on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-907636800






-- 
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] [incubator-doris] morningman commented on a change in pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#discussion_r697847720



##########
File path: be/src/service/internal_service.cpp
##########
@@ -124,7 +126,8 @@ void PInternalServiceImpl<T>::tablet_writer_add_batch(google::protobuf::RpcContr
             }
             st.to_protobuf(response->mutable_status());
         }
-        response->set_execution_time_us(execution_time_ns / 1000);
+        response->set_execution_time_us(execution_time_ns / NANOS_PER_MICRO);
+        response->set_wait_execution_time_us(execution_time_ns / NANOS_PER_MICRO);

Review comment:
       ```suggestion
           response->set_wait_execution_time_us(wait_execution_time_us / NANOS_PER_MICRO);
   ```




-- 
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] [incubator-doris] github-actions[bot] commented on pull request #6397: [Optimize] Support send batch parallelism for olap table sink

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #6397:
URL: https://github.com/apache/incubator-doris/pull/6397#issuecomment-907971876


   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