Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1961

Set the max memory to give to the build test processes

    Details

    • Difficulty:
      Unknown
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Right now we don't set the JVM max memory to give to our tests. We use the surefire and failsafe plugins with the default config which is to fork a JVM and since we don't the memory, by default Java uses about 1/4th of the physical memory available.

      For example:

      • On my local mac: tests get 4.2GB since I have 16GB total
      • On a5, tests get 2GB since the machine has 8GB total
      • On a4, tests get 8.4GB since the machine has 32GB.
      • On a3, tests get 4.1GB since the machine has 16GB

      Note about a4: if we have 2 builds in parallel tis means: 2GB * 2 (for the maven build) + 8.4 *2 = 20.8GB. And 3 builds would give: 31.2GB, which means that we cannot have 3 builds running in parallel, whereas by setting the memory it could work.

      => it's important to set the max memory

      And when I run our docker build image locally, tests only get 625MB because on Mac you control how much memory is given to your containers by default and it's set to 2.5GB for me (625MB = 2.5/4). This is why I get a Java Heap error when running some functional tests.

      => it's important to set the max memory

        Attachments

          Activity

            People

            • Assignee:
              vmassol Vincent Massol
              Reporter:
              vmassol Vincent Massol
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: