Jenkins running at very high CPU usage

前端 未结 5 1296
粉色の甜心
粉色の甜心 2021-02-18 23:59

I recently upgraded from Jenkins 1.6 to 2.5. After I did this, I noticed very high CPU usage, sometimes over 300% (there are only 4 cores, so I don\'t think it could go over 40

5条回答
  •  太阳男子
    2021-02-19 00:39

    I have noticed a couple of reasons for abnormal CPU usage with my Jenkins install on Windows 7 Ultimate.

    1. I had recently upgraded from v2.138 to v2.140 plus added a few additional plugins. I started noticing a problem with the Jenkins java executable taking up to 60% of my CPU time every time a job would trigger. None of the jobs were CPU bound, just grabbing data from external servers, so it didn't make any sense. It was fixed with a simple restart of the Jenkins service. I assume the upgrade just didn't finish cleanly.

    2. Java Garbage Collection was throwing errors and hogging the CPU when running with the default memory settings. It was probably overkill, but I went wild and upped the Java Heap Space for Jenkins from the default 256mb to 4gb; which solved this problem for me.

      See this solution for instructions: https://stackoverflow.com/a/8122566/4479786

提交回复
热议问题