Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5100

Hints for setting mem options of maven&plug-ins (for parallel builds)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 3.0.3
    • None
    • Documentation: Guides
    • None

    Description

      (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 ... oh, he's such a nice guy ...)

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            karniemi Kari J. Niemi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: