You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/22 13:11:18 UTC

[GitHub] [rocketmq] jianglianggithub opened a new issue, #5571: MappedFile#warmMappedFile there may be code that doesn't work

jianglianggithub opened a new issue, #5571:
URL: https://github.com/apache/rocketmq/issues/5571

   文件预热
   1.会给每个page 写入一个假值0 
   2.然后使用mlock来让liunx不回收对应的物理内存
   3. madvise 让系统先读取一些数据出来
   
   这里有个问题 如果1只是为了预先读取一些数据出来避免后续出现缺页中断的话,mlock本身就会触发缺页中断处理了
   如果不是的话就是之所以put是因为mlock可能不生效有些页是cow的,但是在创建内存映射mmap的时候指定了 MapMode.READ_WRITE
   在这个mode下是不会发生cow的所以我觉得这个for 循环put 一个假值好像是没啥用的 因为在这个mode下 先put一个假值好像没意义


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] jianglianggithub commented on issue #5571: MappedFile#warmMappedFile there may be code that doesn't work

Posted by "jianglianggithub (via GitHub)" <gi...@apache.org>.
jianglianggithub commented on issue #5571:
URL: https://github.com/apache/rocketmq/issues/5571#issuecomment-1491624708

   @Oliverwqcwrw 您好过去很久了,我看到ISSUE 4902 里面说了一些相关的东西,比如红帽的文档那个链接 看了下貌似没解决我得疑问,


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] MappedFile#warmMappedFile there may be code that doesn't work [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5571:
URL: https://github.com/apache/rocketmq/issues/5571#issuecomment-2028503974

   This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] MappedFile#warmMappedFile there may be code that doesn't work [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5571: MappedFile#warmMappedFile there may be code that doesn't work
URL: https://github.com/apache/rocketmq/issues/5571


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] Oliverwqcwrw commented on issue #5571: MappedFile#warmMappedFile there may be code that doesn't work

Posted by "Oliverwqcwrw (via GitHub)" <gi...@apache.org>.
Oliverwqcwrw commented on issue #5571:
URL: https://github.com/apache/rocketmq/issues/5571#issuecomment-1491697584

   @jianglianggithub 我的理解是mlock在锁定内存的时候,操作系统会确保物理内存足够来容纳这个区域,因此在使用mlock时,不会触发缺页中断。但如果内存不足,操作系统将无法保证所有被mlock锁定的内存都可以驻留在物理内存中,这时会出现一定的概率触发缺页中断。
   所以我觉得这块预热是OK的


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] MappedFile#warmMappedFile there may be code that doesn't work [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5571:
URL: https://github.com/apache/rocketmq/issues/5571#issuecomment-2035832969

   This issue was closed because it has been inactive for 3 days since being marked as stale.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org