-
Notifications
You must be signed in to change notification settings - Fork 641
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
[ISSUE #4630] Fix concurrency problem and split task handle threadpool #4679
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,28 @@ | |
private int eventMeshTcpGlobalScheduler = 5; | ||
|
||
@ConfigFiled(field = "tcp.taskHandleExecutorPoolSize") | ||
private int eventMeshTcpTaskHandleExecutorPoolSize = Runtime.getRuntime().availableProcessors(); | ||
private int eventMeshTcpTaskHandleExecutorPoolSize = 2 * Runtime.getRuntime().availableProcessors(); | ||
|
||
@ConfigFiled(field = "tcp.sendExecutorPoolSize") | ||
private int eventMeshTcpMsgSendExecutorPoolSize = 2 * Runtime.getRuntime().availableProcessors(); | ||
|
||
@ConfigFiled(field = "tcp.replyExecutorPoolSize") | ||
private int eventMeshTcpMsgReplyExecutorPoolSize = 2 * Runtime.getRuntime().availableProcessors(); | ||
|
||
@ConfigFiled(field = "tcp.ackExecutorPoolSize") | ||
private int eventMeshTcpMsgAckExecutorPoolSize = 2 * Runtime.getRuntime().availableProcessors(); | ||
|
||
Comment on lines
61
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although this is an IO-intensive scenario, with the original single thread pool being split into four, and each thread pool having twice the coreSize as before, the number of threads is 8 times the original. Considering that the 1-RTT time in EventMesh is relatively short, I suggest setting the |
||
@ConfigFiled(field = "tcp.taskHandleExecutorQueueSize") | ||
private int eventMeshTcpTaskHandleExecutorQueueSize = 10000; | ||
Check warning on line 74 in eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java Codecov / codecov/patcheventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java#L74
|
||
|
||
@ConfigFiled(field = "tcp.sendExecutorQueueSize") | ||
private int eventMeshTcpMsgSendExecutorQueueSize = 10000; | ||
Check warning on line 77 in eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java Codecov / codecov/patcheventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java#L77
|
||
|
||
@ConfigFiled(field = "tcp.replyExecutorQueueSize") | ||
private int eventMeshTcpMsgReplyExecutorQueueSize = 10000; | ||
Check warning on line 80 in eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java Codecov / codecov/patcheventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java#L80
|
||
|
||
@ConfigFiled(field = "tcp.ackExecutorQueueSize") | ||
private int eventMeshTcpMsgAckExecutorQueueSize = 10000; | ||
Check warning on line 83 in eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java Codecov / codecov/patcheventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshTCPConfiguration.java#L83
|
||
|
||
@ConfigFiled(field = "tcp.msgDownStreamExecutorPoolSize") | ||
private int eventMeshTcpMsgDownStreamExecutorPoolSize = Math.max(Runtime.getRuntime().availableProcessors(), 8); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the queue length from a hard-coded value to a configurable value for this ExecutorService, like that of ExecutorServices above?