更改 Jenkins 服务器的线程数 [英] Change number of threads for Jenkins server

查看:30
本文介绍了更改 Jenkins 服务器的线程数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的虚拟服务器上安装了 Jenkins.当我查看 htop Jenkins 运行 30 个线程时,每个线程都可以分配 247MB 内存和最多 1181MB 的虚拟内存.

I installed Jenkins on my vserver. When I had a look at htop Jenkins was running with 30 thread, each was allowed to allocate 247MB memory and up to 1181MB virtual memory.

因为我只有一个小型虚拟服务器,所以我尝试更改线程数.但是我找不到任何配置文件.

Because I've only a small vserver I tried to change the number of threads. But I could not find any configuration file.

我通过 aptitude install jenkins 安装了 jenkins,在 htop 中我可以看到 Jenkins 从以下位置运行:/usr/bin/java -jar/usr/share/jenkins/jenkins.war

I installed jenkins via aptitude install jenkins and in htop I can see that Jenkins is running from: /usr/bin/java -jar /usr/share/jenkins/jenkins.war

Tomcat 没有安装,jetty 也没有安装.

Tomcat isn't installed as well as jetty isn't installed.

保存的线程数信息在哪里?或者如何减少 Jenkins 的线程数?

Where is the information about the number of threads saved? Or how can I reduce the number of threads for Jenkins?

推荐答案

http://winstone.sourceforge.net/#commandLine 是官方的命令行参考 - 但正如我在评论中提到的 --handlerCountMax (或 --handlerCountStartup,就此而言)确实似乎不适合我.自己尝试一下(这里是如何以独立模式运行 Jenkins).

http://winstone.sourceforge.net/#commandLine is the official command-line reference - but as I mention in the comment --handlerCountMax (or --handlerCountStartup, for that matter) did not seem to work for me. Try it yourself (here's how to run Jenkins in stand-alone mode).

您可能想尝试减少执行程序的数量以及禁用不需要的插件,然后看看会发生什么.

You may want to try to reduce the number of executors as well as disabling plugins you do not need and see what happens.

但是请记住,如果您打算继续认真使用 Jenkins,您应该计划更多资源,而不是更少:随着工作数量的增加,资源利用率也会增加.

Please keep in mind, however, that if you plan to continue using Jenkins seriously, you should plan for more resources, not less: as the number of your jobs grows, so will the resource utilization.

这篇关于更改 Jenkins 服务器的线程数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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