You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jorg Heymans <jo...@gmail.com> on 2016/06/01 08:47:10 UTC

any ideas why 'Scanning for projects' is very slow ?

Hi,

I am trying to pinpoint a performance issue we are incurring with maven
under Jenkins. Basically what we are seeing is that maven is taking a very
long time getting past the initial 'Scanning for projects' message. As you
can see in below snippet, more than half a minute elapses before the first
module is starting to build.

*00:00:11.634* Maven home:
/home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
home: /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
name: "sunos", version: "5.10", arch: "sparc", family: "unix"

*00:00:11.757* [INFO] Scanning for projects...

*00:00:42.350* [INFO]
                       *00:00:42.350* [INFO]
------------------------------------------------------------------------*00:00:42.350*
[INFO] Building Document Implementation 0.2-SNAPSHOT


This is a very small project we're building, containing only one maven
module. In this case it's half a minute, we have seen other maven
builds where it takes 2-3 minutes or more.


Can anyone tell me what maven is doing in this 'Scanning for projects'
that is potentially very slow ? If i run the build in offline mode the
problem disappears, but that is not an option for us. Note that
developers executing builds locally do not see the same performance
issue.


Thanks,

Jorg


PS the thread on the jenkins forum
https://groups.google.com/forum/#!topic/jenkinsci-users/3s2MeImr2eY

Re: any ideas why 'Scanning for projects' is very slow ?

Posted by Jorg Heymans <jo...@gmail.com>.
Thanks Stephen, you know i actually considered putting this link in my
previous reply about why i am not using the freestyle job type :-) But
there is just too much that does not work anymore in freestyle, such as
- executor-local repositories
- maven releases
- automatic post-build deploy

... just to name a few. I am sure I could script all these things back into
a freestyle job but why ? I did attempt this several times over the years,
but ended up abandoning it each time because of the complexity i would need
to maintain myself + the several hundreds of build jobs to migrate ...

Jorg

On Thu, Jun 2, 2016 at 11:25 AM Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

>
> http://javaadventure.blogspot.ie/2013/11/jenkins-maven-job-type-considered-evil.html
>
> On 2 June 2016 at 07:22, Jorg Heymans <jo...@gmail.com> wrote:
>
> > Hi,
> >
> > Thanks for the suggestions.
> >
> > --no-snapshot-updates does not make a difference. I tried out the
> profiler
> > and it gives me a breakdown of timings per phase, but it does not have
> any
> > timings on what happened before the first phase starts, which is exactly
> > where the slowdown occurs.
> >
> > Converting the job to a freestyle project in jenkins also solves the
> issue,
> > but it's not really an option for us since we rely on a lot of the
> > functionality that the maven job type offers. I guess i will have to head
> > back to the Jenkins side then to find out what is going on. I know
> Jenkins
> > is instrumenting the maven process with some extra functionality and even
> > rewrites the pom internally before execution.
> >
> > Apart from that, is there any other way to get a bit more debug info out
> of
> > maven during the 'scanning for projects' phase ?
> >
> > Jorg
> >
> > On Wed, Jun 1, 2016 at 8:24 PM Karl Heinz Marbaise <kh...@gmx.de>
> > wrote:
> >
> > > BTW: What also comes to my mind.
> > >
> > >
> > > Does the same happen if you ran that project as a freestyle project
> > > instead of Maven Job type (which i assume) ?
> > >
> > >
> > > Kind regards
> > > Karl Heinz Marbaise
> > > On 6/1/16 8:04 PM, Karl Heinz Marbaise wrote:
> > > > Hi,
> > > >
> > > > On 6/1/16 10:47 AM, Jorg Heymans wrote:
> > > >> Hi,
> > > >>
> > > >> I am trying to pinpoint a performance issue we are incurring with
> > maven
> > > >> under Jenkins. Basically what we are seeing is that maven is taking
> a
> > > >> very
> > > >> long time getting past the initial 'Scanning for projects' message.
> As
> > > >> you
> > > >> can see in below snippet, more than half a minute elapses before the
> > > >> first
> > > >> module is starting to build.
> > > >>
> > > >> *00:00:11.634* Maven home:
> > > >>
> > >
> >
> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
> > > >>
> > > >> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634*
> Java
> > > >> home:
> > > >>
> /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
> > > >> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
> > > >> name: "sunos", version: "5.10", arch: "sparc", family: "unix"
> > > >
> > > >
> > > >>
> > > >> *00:00:11.757* [INFO] Scanning for projects...
> > > >>
> > > >> *00:00:42.350* [INFO]
> > > >>                        *00:00:42.350* [INFO]
> > > >>
> > >
> >
> ------------------------------------------------------------------------*00:00:42.350*
> > > >>
> > > >> [INFO] Building Document Implementation 0.2-SNAPSHOT
> > > >
> > > > Is this project an Maven Tycho project ?
> > > >
> > > > Kind regards
> > > > Karl Heinz Marbaise
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
>

Re: any ideas why 'Scanning for projects' is very slow ?

Posted by Stephen Connolly <st...@gmail.com>.
http://javaadventure.blogspot.ie/2013/11/jenkins-maven-job-type-considered-evil.html

On 2 June 2016 at 07:22, Jorg Heymans <jo...@gmail.com> wrote:

> Hi,
>
> Thanks for the suggestions.
>
> --no-snapshot-updates does not make a difference. I tried out the profiler
> and it gives me a breakdown of timings per phase, but it does not have any
> timings on what happened before the first phase starts, which is exactly
> where the slowdown occurs.
>
> Converting the job to a freestyle project in jenkins also solves the issue,
> but it's not really an option for us since we rely on a lot of the
> functionality that the maven job type offers. I guess i will have to head
> back to the Jenkins side then to find out what is going on. I know Jenkins
> is instrumenting the maven process with some extra functionality and even
> rewrites the pom internally before execution.
>
> Apart from that, is there any other way to get a bit more debug info out of
> maven during the 'scanning for projects' phase ?
>
> Jorg
>
> On Wed, Jun 1, 2016 at 8:24 PM Karl Heinz Marbaise <kh...@gmx.de>
> wrote:
>
> > BTW: What also comes to my mind.
> >
> >
> > Does the same happen if you ran that project as a freestyle project
> > instead of Maven Job type (which i assume) ?
> >
> >
> > Kind regards
> > Karl Heinz Marbaise
> > On 6/1/16 8:04 PM, Karl Heinz Marbaise wrote:
> > > Hi,
> > >
> > > On 6/1/16 10:47 AM, Jorg Heymans wrote:
> > >> Hi,
> > >>
> > >> I am trying to pinpoint a performance issue we are incurring with
> maven
> > >> under Jenkins. Basically what we are seeing is that maven is taking a
> > >> very
> > >> long time getting past the initial 'Scanning for projects' message. As
> > >> you
> > >> can see in below snippet, more than half a minute elapses before the
> > >> first
> > >> module is starting to build.
> > >>
> > >> *00:00:11.634* Maven home:
> > >>
> >
> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
> > >>
> > >> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
> > >> home:
> > >> /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
> > >> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
> > >> name: "sunos", version: "5.10", arch: "sparc", family: "unix"
> > >
> > >
> > >>
> > >> *00:00:11.757* [INFO] Scanning for projects...
> > >>
> > >> *00:00:42.350* [INFO]
> > >>                        *00:00:42.350* [INFO]
> > >>
> >
> ------------------------------------------------------------------------*00:00:42.350*
> > >>
> > >> [INFO] Building Document Implementation 0.2-SNAPSHOT
> > >
> > > Is this project an Maven Tycho project ?
> > >
> > > Kind regards
> > > Karl Heinz Marbaise
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>

Re: any ideas why 'Scanning for projects' is very slow ?

Posted by Jorg Heymans <jo...@gmail.com>.
Hi,

Thanks for the suggestions.

--no-snapshot-updates does not make a difference. I tried out the profiler
and it gives me a breakdown of timings per phase, but it does not have any
timings on what happened before the first phase starts, which is exactly
where the slowdown occurs.

Converting the job to a freestyle project in jenkins also solves the issue,
but it's not really an option for us since we rely on a lot of the
functionality that the maven job type offers. I guess i will have to head
back to the Jenkins side then to find out what is going on. I know Jenkins
is instrumenting the maven process with some extra functionality and even
rewrites the pom internally before execution.

Apart from that, is there any other way to get a bit more debug info out of
maven during the 'scanning for projects' phase ?

Jorg

On Wed, Jun 1, 2016 at 8:24 PM Karl Heinz Marbaise <kh...@gmx.de>
wrote:

> BTW: What also comes to my mind.
>
>
> Does the same happen if you ran that project as a freestyle project
> instead of Maven Job type (which i assume) ?
>
>
> Kind regards
> Karl Heinz Marbaise
> On 6/1/16 8:04 PM, Karl Heinz Marbaise wrote:
> > Hi,
> >
> > On 6/1/16 10:47 AM, Jorg Heymans wrote:
> >> Hi,
> >>
> >> I am trying to pinpoint a performance issue we are incurring with maven
> >> under Jenkins. Basically what we are seeing is that maven is taking a
> >> very
> >> long time getting past the initial 'Scanning for projects' message. As
> >> you
> >> can see in below snippet, more than half a minute elapses before the
> >> first
> >> module is starting to build.
> >>
> >> *00:00:11.634* Maven home:
> >>
> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
> >>
> >> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
> >> home:
> >> /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
> >> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
> >> name: "sunos", version: "5.10", arch: "sparc", family: "unix"
> >
> >
> >>
> >> *00:00:11.757* [INFO] Scanning for projects...
> >>
> >> *00:00:42.350* [INFO]
> >>                        *00:00:42.350* [INFO]
> >>
> ------------------------------------------------------------------------*00:00:42.350*
> >>
> >> [INFO] Building Document Implementation 0.2-SNAPSHOT
> >
> > Is this project an Maven Tycho project ?
> >
> > Kind regards
> > Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: any ideas why 'Scanning for projects' is very slow ?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
BTW: What also comes to my mind.


Does the same happen if you ran that project as a freestyle project 
instead of Maven Job type (which i assume) ?


Kind regards
Karl Heinz Marbaise
On 6/1/16 8:04 PM, Karl Heinz Marbaise wrote:
> Hi,
>
> On 6/1/16 10:47 AM, Jorg Heymans wrote:
>> Hi,
>>
>> I am trying to pinpoint a performance issue we are incurring with maven
>> under Jenkins. Basically what we are seeing is that maven is taking a
>> very
>> long time getting past the initial 'Scanning for projects' message. As
>> you
>> can see in below snippet, more than half a minute elapses before the
>> first
>> module is starting to build.
>>
>> *00:00:11.634* Maven home:
>> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
>>
>> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
>> home:
>> /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
>> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
>> name: "sunos", version: "5.10", arch: "sparc", family: "unix"
>
>
>>
>> *00:00:11.757* [INFO] Scanning for projects...
>>
>> *00:00:42.350* [INFO]
>>                        *00:00:42.350* [INFO]
>> ------------------------------------------------------------------------*00:00:42.350*
>>
>> [INFO] Building Document Implementation 0.2-SNAPSHOT
>
> Is this project an Maven Tycho project ?
>
> Kind regards
> Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: any ideas why 'Scanning for projects' is very slow ?

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,

On 6/1/16 10:47 AM, Jorg Heymans wrote:
> Hi,
>
> I am trying to pinpoint a performance issue we are incurring with maven
> under Jenkins. Basically what we are seeing is that maven is taking a very
> long time getting past the initial 'Scanning for projects' message. As you
> can see in below snippet, more than half a minute elapses before the first
> module is starting to build.
>
> *00:00:11.634* Maven home:
> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
> home: /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
> name: "sunos", version: "5.10", arch: "sparc", family: "unix"


>
> *00:00:11.757* [INFO] Scanning for projects...
>
> *00:00:42.350* [INFO]
>                        *00:00:42.350* [INFO]
> ------------------------------------------------------------------------*00:00:42.350*
> [INFO] Building Document Implementation 0.2-SNAPSHOT

Is this project an Maven Tycho project ?

Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: any ideas why 'Scanning for projects' is very slow ?

Posted by jieryn <ji...@gmail.com>.
Try: mvn --no-snapshot-updates
Try: https://github.com/takari/maven-profiler

On Wed, Jun 1, 2016 at 4:47 AM, Jorg Heymans <jo...@gmail.com> wrote:
> Hi,
>
> I am trying to pinpoint a performance issue we are incurring with maven
> under Jenkins. Basically what we are seeing is that maven is taking a very
> long time getting past the initial 'Scanning for projects' message. As you
> can see in below snippet, more than half a minute elapses before the first
> module is starting to build.
>
> *00:00:11.634* Maven home:
> /home/ci/jenkins/data/tools/hudson.tasks.Maven_MavenInstallation/maven3*00:00:11.634*
> Java version: 1.7.0_80, vendor: Oracle Corporation*00:00:11.634* Java
> home: /home/ci/jenkins/data/tools/hudson.model.JDK/jdk1.7/jre*00:00:11.634*
> Default locale: en, platform encoding: ISO646-US*00:00:11.634* OS
> name: "sunos", version: "5.10", arch: "sparc", family: "unix"
>
> *00:00:11.757* [INFO] Scanning for projects...
>
> *00:00:42.350* [INFO]
>                        *00:00:42.350* [INFO]
> ------------------------------------------------------------------------*00:00:42.350*
> [INFO] Building Document Implementation 0.2-SNAPSHOT
>
>
> This is a very small project we're building, containing only one maven
> module. In this case it's half a minute, we have seen other maven
> builds where it takes 2-3 minutes or more.
>
>
> Can anyone tell me what maven is doing in this 'Scanning for projects'
> that is potentially very slow ? If i run the build in offline mode the
> problem disappears, but that is not an option for us. Note that
> developers executing builds locally do not see the same performance
> issue.
>
>
> Thanks,
>
> Jorg
>
>
> PS the thread on the jenkins forum
> https://groups.google.com/forum/#!topic/jenkinsci-users/3s2MeImr2eY

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org