Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27292

Very first build on slave takes significantly much time than next ones

XMLWordPrintable

      Hi everyone,

      I've recently stepped into a really strange issue to me, I wonder if you could explain me mechanisms that are happening during my build processes.

      I am using the EC2 plugin to spawn a slave agents. I've prepared provisioned slave image with all necessary packages, repository cloned, and artifacts downloaded, but when a job is being run for the very first time, step below:

      00:00:00.004 Building remotely on EC2 Android-runner (i-eb81dd28) (ubuntu-java-ec2) in workspace /home/ubuntu/workspace/Android-Devel
      00:01:29.496  > git rev-parse --is-inside-work-tree # timeout=10
      

      use to run for longer than minute. After this first job is completed and I trigger one more build on that slave and this "Building remotely..." step takes only a second.

      Could you explain me what is being done there so that it takes so long for the very first time after launching slave?

      Exactly the same time difference appears in the last step

      00:08:31.055 Recording test results
      00:10:21.737 Finished: SUCCESS

      versus:

      00:04:32.545 Recording test results
      00:05:18.314 Finished: SUCCESS

      It seems like the long-lasting tasks are all involving some master-slave communication, but I couldn't find any information about this in logs..

      Could you please tell me why such a differences between first and the following builds appear?

      My plans were to spawn a node per built, but when total build time takes twice the time than build on long-running slave it seems not to have sense at all..

            francisu Francis Upton
            mieciu Przemek Hejman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: