Jenkins以很高的CPU使用率运行 [英] Jenkins running at very high CPU usage

查看:1583
本文介绍了Jenkins以很高的CPU使用率运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从詹金斯1.6升级到2.5。完成此操作后,我发现CPU使用率非常高,有时超过300%(只有4个内核,因此我认为它不会超过400%)。我不确定从哪里开始调试此程序,



顶部:

解决方案

原来,我的问题是几个工作有数千个旧版本。在Jenkins 1.6中还可以,但是在2.5中是个问题(我想也许Jenkins在查看工作概述页面时会尝试将所有内部版本加载到内存中)。要解决此问题,我只是使用此策略从问题工作 中删除了大多数旧版本,然后重新加载了詹金斯。



我还设置了放弃旧版本插件,仅保留50个最新版本,以防止再次发生。


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 400%). I'm not sure where to begin debugging this, but here's a thread dump and some screenshots from top/htop

htop

top:

解决方案

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.

这篇关于Jenkins以很高的CPU使用率运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆