shengminw commented on PR #4601:
URL: https://github.com/apache/rocketmq/pull/4601#issuecomment-1184105162

   > The back pressure mechanism is a very useful function, but at present, 
when the traffic of rocketmq is close to the bottleneck, the traffic will drop 
sharply due to "buzy". I hope to improve this phenomenon. Can you provide the 
improvement brought by this PR? such as test results
   
   @guyinyou 
   IMO, the current design is indeed close to bottleneck, but the processing of 
messages is always continuous, so it will tend to a steady state. The number of 
successfully written messages per second does not change much. Only the message 
sending rate is reduced. If there is no back pressure, there will still be lots 
of rejections.
   Due to limited testing equipment, I just ran a simple test on my laptop.
   I set the producer to 4 threads for continuous asynchronous message sending.
   At the same time, I set up a thread to monitor the number of successfully 
sent messages, the number of timeouts messages, and the number of rejected 
messages within this 1s.
   
   * When **off enableBackpressureForAsyncMode**:
   
![off-enable](https://user-images.githubusercontent.com/107378995/178924477-1685981b-1836-4371-adb0-4bbbb1ffeec8.png)
   
   * When **on enableBackpressureForAsyncMode**:
   
![on-enable](https://user-images.githubusercontent.com/107378995/178924590-6766e957-d530-44d5-8767-409666a544a5.png)
   
   Although the local test cannot completely simulate the heavy-traffic 
environment in the server, it can still be seen, that after turning on the 
backpressure, **the async-sending rate is reduced, but the rate of successful 
message writing remains unchanged. Besides, a large number of rejections can be 
avoided.**
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to