-
Notifications
You must be signed in to change notification settings - Fork 11.5k
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
Question About [NOTIFYME]putMessage in lock cost time(ms)=4052 #721
Comments
rocketmq version is 4.3.0 |
@mm23504570 As you described in this issue, you deployed the RocketMQ broker in a 8 core cpu server, but as the log showed, there are more than 48 sendMessageThread in config, and as RocketMQ used spinlock as default, so you can try to adjust the sendMessageThread num to 8 to prevent more thread was blocked to obtain the spinlock, and this also will decrease you cpu utility. And please pay more attention to your memory usage especially cache usage, please reserve relative more free memory for RocketMQ. |
@duhenglucky Thank you. I will set sendMessageThread to 8 to test it. |
I met the same issue this morning, haven't got a solution for it. The issue is not reproducable for now. But it may occur after. I'm running RMQ in a 2 core cpu server. And I've changed the default spinlock to reentrantLock.
|
After I changed the conf , the problem still exists.
36G cache
|
@gaoyf 你的server硬件配置怎样? 你的配置值是什么依据做出的? |
@gaoyf 你的rocketmq broker有打
|
这个很久了,记不太清楚了,现在日志也没了,不过我没用定时消息。 |
@gaoyf 咱俩应该不是一个问题。你这个是请求在队列里堆的时间超时了被清理掉报的错 |
@gaoyf you can try to execute os.sh and setcache.sh and open the transientStorePoolEnable config in the broker to polish this situation. |
@duhenglucky could you explain a little more detail about os.sh and setcache.sh ? It may do help, but I haven't got a full understanding of their usage. |
how much is the broker qps ?? |
@mm23504570 不知道你后续是如何改善的,目前我们也存在这样的问题,我定位源码发现耗时主要在主从同步部分,slave节点拉取到消息后写入磁盘的时候,使用position标记位置的时候,会比较耗时 |
@mm23504570 根据我的测试结果,我发现应该是主从同步slave使用FileChannel.position(offset)标记位置的时候,同时slave节点执行刷盘flush(false),然后导致position调用阻塞,进而影响到了master节点主从同步阻塞引起的 |
I set vm.min_free_kbytes = 1000000 and resolved the problem.
|
能不能问下 你是如何测试的? 我在调试时只能debug, 但是定位不了特别具体的耗时步骤. |
问下, 你这里的总计内存48G, 设置了 vm.min_free_kbytes=1G; 这样的考虑是什么? 设置后的对系统/RMQ的预期影响是什么? |
@icersummer 我只是添加了打印耗时代码,然后重新编译了测试的 |
I met the same issue, which version does this fix patched? thanks |
@davidpdw 你是配置的同步吗。 |
Question
I have used rocketmq in production env. There is some WARN in broker log when user send message to broker. Caused the message to fail to be sent. It looks like it is blocked when it is written to the page cache.
Please give me some suggestions to improve this issue. Thank you.
In our application scenario, we use much delay message than realtime message. These exceptions occur whenever we consume a lot of delayed messages. Is this related?
ENV:
8 CPU. 48G MEM. SSD disk
I have run broker after run os.sh. I can't set io scheduler to DEADLINE, because machine of cloud not support. default is none
Some log
The text was updated successfully, but these errors were encountered: