【问题标题】:Matlab bad performance under JenkinsJenkins下的Matlab表现不佳
【发布时间】:2014-11-18 08:50:13
【问题描述】:

我有一个 Jenkins 脚本执行步骤,它使用 Matlab 处理输出数据以评估测试结果。

当从命令提示符运行脚本时,它会很快启动并退出,但是当使用来自 Jenkins 的相同参数执行相同的脚本时,它的性能非常好。我在出现的“仅提示”窗口中收到 Matlab 欢迎消息,但在我为作业设置的 2 小时超时内没有其他任何内容。

已禁用节点上的 Jenkins Windows 服务,并正在从桌面运行节点进程,但没有区别:

C:\Windows\System32\java.exe -jar c:\j-mpc\slave.jar -jnlpUrl http://<server>/slave-agent.jnlp -secret <xxxxx>

也尝试为节点进程增加内存但没有改变:

C:\Windows\System32\java.exe -Xmx2048m

杀死以 bash 开头的进程树时,表明它是从 java.exe-sh.exe 树(Pocess Explorer 窗口)继承的,但中间缺少 PID:

java.exe (<0.01%, 1 420 000K) 
  sh.exe (<0.01%, 2 140K)
bash.exe (<0.01%, 2 580K)
  bash.exe (     , 2 580K)
    python.exe (     , 6 044K)
      python.exe (     , 4 800K)
        matlab.exe (     , 1 844K)
          MATLAB.exe (<0.01%, 167 324K)

从 Jenkins 调用时,子进程中是否存在限制内存或进程使用的隐藏限制,在其他工作中我没有看到相同的限制。 Matlab 的内存分配非常慢(从开始到合理大小>100M 大约需要一分钟)

(有来自 Process Explorer 的屏幕转储,但我不允许上传)

编辑

我还尝试将来自 Jenkins 的调用限制为单个 Windows 命令行,结果相同(怀疑是深层调用堆栈造成的)但结果相同。

matlab.exe -nodisplay -nosplash -nodesktop -wait -logfile "log_file.txt" -r "try script_file ;catch err; disp(err.message); end ; exit"

【问题讨论】:

    标签: windows bash matlab jenkins


    【解决方案1】:

    通过在 Jenkins 节点设置中设置 LM_LICENSE_FILE 环境变量解决。 (找到了thread about slow startup

    显然Jenkins启动的shell环境不完全符合explorer启动的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-12
      • 1970-01-01
      • 2017-12-10
      • 2012-02-05
      相关资源
      最近更新 更多