Gradle Build takes long time while running from Jenkins slave but its faster when I run from local command line

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Gradle Build takes long time while running from Jenkins slave but its faster when I run from local command line

Saravanan Manickam
Gradle Clean/Build takes long time while running from Jenkins slave but its faster when I run from local command line on the same slave with the same user logged in.

I have a gradle job configured and it runs as part of multi branch pipeline.
* Checkout - First stage
* Clean  - Second stage
* Build - Thrid stage

When the job is run from Jenkins (dedicated slave), it took 12 mins of time to complete the clean operation and 1 hour for build operation.

Whereas, when I logged into the same slave machine with same user I used in Jenkins, it took only 4 mins for clean and 15 mins for build.

The remote root directory is in NFS path. I also played around increasing the heap space for Jenkins slave with advanced JVM options "-Xms4096M -Xmx8192M -XX:MaxPermSize=4192M -Djava.awt.headless=true", but it doenst help much.

Please share your thoughts.

Regads,
Saravanan

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAA527xJHbkSGCi3Z7EW0YvBJAHUEEeaZ1cbs32QDXqwsSJ0LFw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle Build takes long time while running from Jenkins slave but its faster when I run from local command line

Ivan Fernandez Calvo
When you run the job on Jenkins the agent process is writing more files to the workspace, like the log so the IO speed to the NFS server is really important, I would not recommend to use NFS for the workspace if you cannot ensure a 100-150MB/s IO and NFSv4 protocol https://support.cloudbees.com/hc/en-us/articles/217479948-NFS-Guide. I guess you need it as cache for the dependencies or other stuff, so should be better to only use the NFS on read only mode for that cache and use the local disk for the build. If you are using pipelines you can reduce the IO by disabling the persistence options but you lost the rerun from a stage feature https://www.jenkins.io/doc/book/pipeline/scaling-pipeline/

El miércoles, 26 de agosto de 2020 a las 14:53:50 UTC+2, [hidden email] escribió:
Gradle Clean/Build takes long time while running from Jenkins slave but its faster when I run from local command line on the same slave with the same user logged in.

I have a gradle job configured and it runs as part of multi branch pipeline.
* Checkout - First stage
* Clean  - Second stage
* Build - Thrid stage

When the job is run from Jenkins (dedicated slave), it took 12 mins of time to complete the clean operation and 1 hour for build operation.

Whereas, when I logged into the same slave machine with same user I used in Jenkins, it took only 4 mins for clean and 15 mins for build.

The remote root directory is in NFS path. I also played around increasing the heap space for Jenkins slave with advanced JVM options "-Xms4096M -Xmx8192M -XX:MaxPermSize=4192M -Djava.awt.headless=true", but it doenst help much.

Please share your thoughts.

Regads,
Saravanan

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8683c8e7-a361-41f7-9881-341da8891e2en%40googlegroups.com.