Change number of threads for Jenkins server

2019-02-17 12:45发布

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?

2条回答
你好瞎i
2楼-- · 2019-02-17 13:36

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.

查看更多
狗以群分
3楼-- · 2019-02-17 13:40

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.

查看更多
登录 后发表回答