You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by zhouxinyu <gi...@git.apache.org> on 2017/01/07 14:26:21 UTC

[GitHub] incubator-rocketmq pull request #31: [ROCKETMQ-33] CPU Occupy 100%

Github user zhouxinyu commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/31#discussion_r95059198
  
    --- Diff: store/src/main/java/org/apache/rocketmq/store/CommitLog.java ---
    @@ -1045,7 +1045,7 @@ public void run() {
     
                 while (!this.isStopped()) {
                     try {
    -                    this.waitForRunning(0);
    +                    this.waitForRunning(1000);
    --- End diff --
    
    `GroupCommitService` will be used when broker is in `SYNC_FLUSH`, so the flushCommitLogService need always `doCommit` without a break.
    
    And this won't cause 100% CPU usage unless your server only has one cpu core.
    
    BTW, how about use `ASYNC_FLUSH` if you mind.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---