You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jörg Schaible <jo...@gmx.de> on 2010/04/27 14:10:44 UTC

Maven performance

Hi guys,

it's not the first time I complain about Maven performance, but it seems M3 
is heading the right direction. Yet, still not on the 2.0.x level:

======== %< =============
$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.0 eclipse:eclipse
Apache Maven 2.0.11
Java version: 1.6.0_20
Java home: /opt/sun-jdk-1.6.0.20/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------       
[INFO] Total time: 2 minutes 46 seconds                                               
[INFO] Finished at: Tue Apr 27 12:06:49 CEST 2010                                     
[INFO] Final Memory: 362M/573M                                                        
------------------------------------------------------------------------

$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.2 eclipse:eclipse
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: /opt/sun-jdk-1.6.0.20/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------
[INFO] Total time: 6 minutes 46 seconds
[INFO] Finished at: Tue Apr 27 11:31:13 CEST 2010
[INFO] Final Memory: 434M/682M
------------------------------------------------------------------------

$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-3.0 eclipse:eclipse
Apache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200)
Java version: 1.6.0_20
Java home: /opt/sun-jdk-1.6.0.20/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------
[INFO] Total time: 4:02.127s
[INFO] Finished at: Tue Apr 27 12:02:12 CEST 2010
[INFO] Final Memory: 344M/443M
------------------------------------------------------------------------
======== %< =============

The build processes ~400 projects. The version output is somewhat faked 
(esp. for M2.0), it's just to give you the details of the environment. M3 is 
way better than M2.2, but not (yet ?) at the level of 2.0.11 (and I bet 
2.0.9 will be a lot faster again).

Also have a look at the memory footprint. Since M2.2 it is quite no longer 
possible for me to build all the stuff at once. M3 looks very promising 
here.

- Jörg



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


RE: Maven performance

Posted by he...@dnbnor.no.
Hi

Do the same test with  mvn org.twdata.maven:maven-cli-plugin:execute-phase - A regular compile with large projects cuts down the time drastically

Hermod 
-----Original Message-----
From: Jörg Schaible [mailto:joerg.schaible@gmx.de] 
Sent: Tuesday, April 27, 2010 2:11 PM
To: dev@maven.apache.org
Subject: Maven performance

Hi guys,

it's not the first time I complain about Maven performance, but it seems M3 is heading the right direction. Yet, still not on the 2.0.x level:

======== %< =============
$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.0 eclipse:eclipse Apache Maven 2.0.11 Java version: 1.6.0_20 Java home: /opt/sun-jdk-1.6.0.20/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------       
[INFO] Total time: 2 minutes 46 seconds                                               
[INFO] Finished at: Tue Apr 27 12:06:49 CEST 2010                                     
[INFO] Final Memory: 362M/573M                                                        
------------------------------------------------------------------------

$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.2 eclipse:eclipse Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_20 Java home: /opt/sun-jdk-1.6.0.20/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------
[INFO] Total time: 6 minutes 46 seconds
[INFO] Finished at: Tue Apr 27 11:31:13 CEST 2010 [INFO] Final Memory: 434M/682M
------------------------------------------------------------------------

$ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-3.0 eclipse:eclipse Apache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200) Java version: 1.6.0_20 Java home: /opt/sun-jdk-1.6.0.20/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
<snip>
------------------------------------------------------------------------
[INFO] Total time: 4:02.127s
[INFO] Finished at: Tue Apr 27 12:02:12 CEST 2010 [INFO] Final Memory: 344M/443M
------------------------------------------------------------------------
======== %< =============

The build processes ~400 projects. The version output is somewhat faked (esp. for M2.0), it's just to give you the details of the environment. M3 is way better than M2.2, but not (yet ?) at the level of 2.0.11 (and I bet
2.0.9 will be a lot faster again).

Also have a look at the memory footprint. Since M2.2 it is quite no longer possible for me to build all the stuff at once. M3 looks very promising here.

- Jörg



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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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


Re: Maven performance

Posted by Arnaud Héritier <ah...@gmail.com>.
I never had results like you.
I always noticed improvements between 2.0>2.2>3.0
I'll do some tests.

Where I have problems for now, it is on some OS. While with OSes like
Suse,OpensSolaris,Windows 7 we have good perfs results for the build, on
linux servers like ubuntu, fedora , ... we have results 4x slower. We are
studying these problems and if we succeed to explain the issue we'll share
it here (I suppose that many of us are using linux for continuous
integration servers)

Arnaud Héritier
Software Factory Manager
eXo platform - http://www.exoplatform.com
---
http://www.aheritier.net


On Tue, Apr 27, 2010 at 2:10 PM, Jörg Schaible <jo...@gmx.de>wrote:

> Hi guys,
>
> it's not the first time I complain about Maven performance, but it seems M3
> is heading the right direction. Yet, still not on the 2.0.x level:
>
> ======== %< =============
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.0 eclipse:eclipse
> Apache Maven 2.0.11
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------
> [INFO] Total time: 2 minutes 46 seconds
> [INFO] Finished at: Tue Apr 27 12:06:49 CEST 2010
> [INFO] Final Memory: 362M/573M
> ------------------------------------------------------------------------
>
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.2 eclipse:eclipse
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------
> [INFO] Total time: 6 minutes 46 seconds
> [INFO] Finished at: Tue Apr 27 11:31:13 CEST 2010
> [INFO] Final Memory: 434M/682M
> ------------------------------------------------------------------------
>
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-3.0 eclipse:eclipse
> Apache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200)
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------
> [INFO] Total time: 4:02.127s
> [INFO] Finished at: Tue Apr 27 12:02:12 CEST 2010
> [INFO] Final Memory: 344M/443M
> ------------------------------------------------------------------------
> ======== %< =============
>
> The build processes ~400 projects. The version output is somewhat faked
> (esp. for M2.0), it's just to give you the details of the environment. M3
> is
> way better than M2.2, but not (yet ?) at the level of 2.0.11 (and I bet
> 2.0.9 will be a lot faster again).
>
> Also have a look at the memory footprint. Since M2.2 it is quite no longer
> possible for me to build all the stuff at once. M3 looks very promising
> here.
>
> - Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Maven performance

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Jason,

Jason van Zyl wrote:

> Jörg,
> 
> If you are going to use the maven-eclipse-plugin as your benchmark I think
> it's going to be very hard to pin point where the bottleneck is. It's a
> little universe unto itself. Could be the shared components, resolution
> code, the plugin itself. I see vast improvements in speed in Maven 3.x. I
> don't think you can use the maven-eclipse-plugin as the basis for
> measuring improvement. For example there is behavior in Maven 3.x that is
> "more correct" which may contribute to some slow down and that we're just
> going to have to live with.

Well, it is an indication. Running a plugin that makes a lot usage of the 
Maven infrastructure does tell more than a build including compilation task 
and packaging time. From 2.0.8 to 2.2.1 there have been also changes to 
ensure "more correct" behaviour, but performance got worse. To be honest, I 
was positively surprised by M3 ;-)

However, Arnaud's remark for Linux is also interesting.

> As one user suggested it may be wise to provide execution timings for the
> core and individual plugins and phases. For example if you found that
> Maven's execution time remained constant over all versions of Maven where
> it was the maven-eclipse-plugin that varied then we know it's an
> interaction problem with the plugin and you can go from there.

Yes, that would be the best approach for a first examination in more detail. 
I'm not close enough to the Maven core, but isn't it possible to exchange 
the Plexus component that executes the mojos with a delegate that measures 
the time for each execution? Is there some kind of Plexus configuration that 
can be used to "injected" such a component from the outside e.g. with the 
m2.conf or with system properties?

> Or use a profiler and find out where the actual problem is and tell us.

A profiler gets interesting if you already can put a finger onto some part 
with such a complex application.

> We've done lots of profiling to get Maven 3.x and M2E running faster. But
> gigantic plugins like m-e-p and the assembler plugin will probably have
> problems entirely their own.

Actually I was really impressed by the memory footprint. Especially since it 
is a necessity e.g. with the Eclipse plugin to generate all Eclipse projects 
at once to get these projects linked.

- Jörg


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


Re: Maven performance

Posted by Jason van Zyl <ja...@sonatype.com>.
Jörg,

If you are going to use the maven-eclipse-plugin as your benchmark I think it's going to be very hard to pin point where the bottleneck is. It's a little universe unto itself. Could be the shared components, resolution code, the plugin itself. I see vast improvements in speed in Maven 3.x. I don't think you can use the maven-eclipse-plugin as the basis for measuring improvement. For example there is behavior in Maven 3.x that is "more correct" which may contribute to some slow down and that we're just going to have to live with.

As one user suggested it may be wise to provide execution timings for the core and individual plugins and phases. For example if you found that Maven's execution time remained constant over all versions of Maven where it was the maven-eclipse-plugin that varied then we know it's an interaction problem with the plugin and you can go from there.

Or use a profiler and find out where the actual problem is and tell us. We've done lots of profiling to get Maven 3.x and M2E running faster. But gigantic plugins like m-e-p and the assembler plugin will probably have problems entirely their own.

On Apr 27, 2010, at 8:10 AM, Jörg Schaible wrote:

> Hi guys,
> 
> it's not the first time I complain about Maven performance, but it seems M3 
> is heading the right direction. Yet, still not on the 2.0.x level:
> 
> ======== %< =============
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.0 eclipse:eclipse
> Apache Maven 2.0.11
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------       
> [INFO] Total time: 2 minutes 46 seconds                                               
> [INFO] Finished at: Tue Apr 27 12:06:49 CEST 2010                                     
> [INFO] Final Memory: 362M/573M                                                        
> ------------------------------------------------------------------------
> 
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-2.2 eclipse:eclipse
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------
> [INFO] Total time: 6 minutes 46 seconds
> [INFO] Finished at: Tue Apr 27 11:31:13 CEST 2010
> [INFO] Final Memory: 434M/682M
> ------------------------------------------------------------------------
> 
> $ MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=128m" mvn-3.0 eclipse:eclipse
> Apache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200)
> Java version: 1.6.0_20
> Java home: /opt/sun-jdk-1.6.0.20/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-gentoo-r7" arch: "i386" Family: "unix"
> <snip>
> ------------------------------------------------------------------------
> [INFO] Total time: 4:02.127s
> [INFO] Finished at: Tue Apr 27 12:02:12 CEST 2010
> [INFO] Final Memory: 344M/443M
> ------------------------------------------------------------------------
> ======== %< =============
> 
> The build processes ~400 projects. The version output is somewhat faked 
> (esp. for M2.0), it's just to give you the details of the environment. M3 is 
> way better than M2.2, but not (yet ?) at the level of 2.0.11 (and I bet 
> 2.0.9 will be a lot faster again).
> 
> Also have a look at the memory footprint. Since M2.2 it is quite no longer 
> possible for me to build all the stuff at once. M3 looks very promising 
> here.
> 
> - Jörg
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

We know what we are, but know not what we may be.

  -- Shakespeare