Jenkins running at very high CPU usage

前端 未结 5 1312
粉色の甜心
粉色の甜心 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:25

    As it turned out, my issue was that several jobs had thousands of old builds. This was fine in Jenkins 1.6 but it's a problem in 2.5 (I guess maybe Jenkins tries to load all the builds into memory when you view the job overview page). To fix it, I just deleted most of the old builds from the problem jobs using this strategy and then reloaded jenkins. Worked like a charm!

    I also set the "discard old builds" plugin to keep only the 50 most recent builds, to prevent this from happening again.

提交回复
热议问题