未验证 提交 e5a3f7d4 编写于 作者: H Heng Du 提交者: GitHub

Merge pull request #2888 from areyouok/dev_speed_D

[ISSUE #2883] [Part D] Improve produce performance in M/S mode. 
......@@ -57,10 +57,9 @@ public class BrokerConfig {
@ImportantField
private boolean traceTopicEnable = false;
/**
* thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default
* value is 1.
* thread numbers for send message thread pool.
*/
private int sendMessageThreadPoolNums = 1; //16 + Runtime.getRuntime().availableProcessors() * 4;
private int sendMessageThreadPoolNums = Math.min(Runtime.getRuntime().availableProcessors(), 4);
private int pullMessageThreadPoolNums = 16 + Runtime.getRuntime().availableProcessors() * 2;
private int processReplyMessageThreadPoolNums = 16 + Runtime.getRuntime().availableProcessors() * 2;
private int queryMessageThreadPoolNums = 8 + Runtime.getRuntime().availableProcessors();
......@@ -73,7 +72,8 @@ public class BrokerConfig {
/**
* Thread numbers for EndTransactionProcessor
*/
private int endTransactionThreadPoolNums = 8 + Runtime.getRuntime().availableProcessors() * 2;
private int endTransactionThreadPoolNums = Math.max(8 + Runtime.getRuntime().availableProcessors() * 2,
sendMessageThreadPoolNums * 4);
private int flushConsumerOffsetInterval = 1000 * 5;
......
......@@ -54,13 +54,12 @@ public class MessageStoreConfig {
/**
* introduced since 4.0.x. Determine whether to use mutex reentrantLock when putting message.<br/>
* By default it is set to false indicating using spin lock when putting message.
*/
private boolean useReentrantLockWhenPutMessage = false;
private boolean useReentrantLockWhenPutMessage = true;
// Whether schedule flush,default is real-time
// Whether schedule flush
@ImportantField
private boolean flushCommitLogTimed = false;
private boolean flushCommitLogTimed = true;
// ConsumeQueue flush interval
private int flushIntervalConsumeQueue = 1000;
// Resource reclaim interval
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册