jenkins - Jenkins 调用了多少个 JVM?

标签 jenkins jvm

我使用 java -jar jenkins.war 和 java -jar slave.jar 来运行 Jenkins master 和 slave。我想知道 Jenkins 调用了多少个 JVM,我可以配置它们的参数。

在大师中:

  • 我认为只有一个 JVM(我不在 master 中运行作业)

在奴隶中:

  • java -jar slave.jar => 一个 JVM
  • 每个作业都有一个新的 JVM,这个 JVM 运行预构建步骤、获取源代码(SVN、GIT 等)、后构建步骤
  • 每个 Maven 都有自己的 JVM 每个 Junit 都有自己的 JVM

另一个问题是,我可以在管理节点的高级部分设置slave的JVM,但是谁使用它的配置?

最佳答案

每个 Maven 构建都不会在其自己的 JVM 中运行。 Java是多线程的。当您启动从站时,您可以配置它可以处理的线程数,主站也是如此。

通常您在从属节点上运行构建。在 unix 系统上,这些可以设置为从远程节点上的主服务器自动运行。

Manage Jenkins -> Manage Nodes -> New Node

在启动高级选项下,您可以为运行 Jenkins 节点软件的远程 JVM 指定 JVM 参数。

每个选项都有帮助,例如“#executors”选项:

This controls the number of concurrent builds that Jenkins can perform. So the value affects the overall system load Jenkins may incur. A good value to start with would be the number of processors on your system.

Increasing this value beyond that would cause each build to take longer, but it could increase the overall throughput, because it allows CPU to build one project while another build is waiting for I/O.

When using Jenkins in the master/slave mode, setting this value to 0 would prevent the master from doing any building on its own. Slaves may not have zero executors, but may be temporarily disabled using the button on the slave's status page.

关于jenkins - Jenkins 调用了多少个 JVM?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19718406/

相关文章:

jenkins - 我在构建 sbt jenkins 管道项目时在 jenkins 控制台中得到 [0m[[0m[0minfo[0m] [0m[0m]

java - jvm 版本 1.4.2_03 不适合此产品。 1.5或更高是必需的问题

java - JVM 字符串存储在内存中

Java Flight Recorder——缺少文件写入/读取事件

svn - 在Docker容器启动上运行SVN更新脚本

java - 将 Spring Boot jar 部署到 Azure,并使 Azure 重新启动

java.lang.ClassCastException : org. hibernate.ejb.HibernatePersistence 无法转换为 WebLogic 中的 javax.persistence.spi.PersistenceProvider

Jenkins thinBackup 插件不工作

java - 捕获内存不足错误之前的最后一个进程

java - 在 Mac OS 上配置 eclipse.ini