Change number of threads for Jenkins server

与世无争的帅哥 提交于 2020-01-11 05:12:27

问题


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.

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 isn't installed as well as jetty isn't installed.

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


回答1:


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.

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.




回答2:


You can also cut down the number of executors you have in your node. This may or may not help - it may be that Jenkins is smart enough to kill the thread when it isn't using an executor. Still, some more information would be useful: How many jobs do you have? What plugins are installed? With more details I could give better advice.



来源:https://stackoverflow.com/questions/9245093/change-number-of-threads-for-jenkins-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!