maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kari J. Niemi (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MNG-5100) Hints for setting mem options of maven&plug-ins (for parallel builds)
Date Mon, 23 May 2011 21:12:22 GMT

    [ http://jira.codehaus.org/browse/MNG-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=268239#action_268239
] 

Kari J. Niemi commented on MNG-5100:
------------------------------------

( If in doubt about forking being slow in Linux:
http://www.oracle.com/technetwork/java/javase/tech/largememory-jsp-137182.html
http://www.google.fi/search?q=fork+is+so+slow+on+Linux+is+because+the+default+page+size+is+4k&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fi:official&client=firefox-a
https://github.com/rtomayko/posix-spawn#readme
http://stackoverflow.com/questions/2731531/faster-forking-of-large-processes-on-linux/2874009#2874009
http://kirkwylie.blogspot.com/2008/11/linux-fork-performance-redux-large.html
http://kirkwylie.blogspot.com/2008/10/linux-less-terrible-choice-for-java.html
http://kirkwylie.blogspot.com/2008/09/solaris-10-terrible-choice-for-java.html#disqus_thread
)

> Hints for setting mem options of maven&plug-ins (for parallel builds)
> ---------------------------------------------------------------------
>
>                 Key: MNG-5100
>                 URL: http://jira.codehaus.org/browse/MNG-5100
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Documentation: Guides
>    Affects Versions: 3.0.3
>            Reporter: Kari J. Niemi
>
> (I enabled parallel builds of maven3 for my project in CI server, it was running quite
nicely giving me much faster builds for a multi-module build. But... it brought our CI server
on it's knees, other projects suffered from this and the CI build server admin bashed me to
get back to serial build :D... oh, he's such a nice guy :D...)
> I did some googling around and found out that in Linux, forking new processes may be
extremely slow in case the parent that forks, has a great memory print. Well, in the past
I had (of course) optimized my build for maven2 by throwing it more (some? no,no... _lots_
of) memory with MAVEN_OPTS by setting both Xms and Xms to the same huge value, not forgetting
the MaxPermSize and PermSize. I suppose this, together with the linux forking "feature", might
cause the extreme cpu load? And of course the CI server process itself has an even bigger
memory print, times ten or something, fortunately I suppose it's not doing so much forking...
> I suppose the memory tuning should/could be done quite differently when using parallel
build feature because the mem is then used in the forked processes which are smaller? So in
parallel build I might set those mem options pretty low, I guess? And also I could be setting
"-client"-mode manually -because otherwise jvm would think it should be running in server
mode (due to running in server HW. Actually I don't quite understand why jvm anyway decides
based on HW whether it should be running in server or client mode - there's no such relation
-not every jvm running on server HW is really a server process...)
> Is there anything that we could be improve in maven/maven documentation in this respect?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message