You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/11/29 15:28:45 UTC

[GitHub] zongtanghu opened a new pull request #567: This code will fix the issue[apache#522] that warm-up method is Ineffective code and result double io in the sync flush

zongtanghu opened a new pull request #567: This code will fix the issue[apache#522] that warm-up method is Ineffective code and result double io in the sync flush
URL: https://github.com/apache/rocketmq/pull/567
 
 
   1.What is the purpose of the change?
   
   In the part of RocketMQ store,the goal of the warm-up mappedFile is that prewrite some random value into memory page corresponding to the mappedFile,so the target memory will swap to the physical memory in advance.But in fact,this action will result in double IO to the operation system.First IO is in the warm-up MappedFile,and secode IO is in the process of write message data into pagecache.
   
   2.Optimization change action
   Because of the above reason,we can remove the part of write some random value,prevent-gc and force flush codes in the warm-up method.In the mmapOperation,we can call mlock() method directly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services