jira-importer commented on issue #166:
URL: 
https://github.com/apache/maven-source-plugin/issues/166#issuecomment-2959545670

   **[Stephan 
Schroevers](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=stephan202)**
 commented
   
   [Kristian 
Rosenvold](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=krosenvold),
 my apologies for not getting back to you earlier.
   
   I wrote the attached [^memory-usage-test.sh] and ran it on a laptop with 
these specs:
   
   ```
   $ mvn -version
   Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T17:41:47+01:00)
   Maven home: /home/sschroevers/tools/mvn3
   Java version: 1.8.0_77, vendor: Oracle Corporation
   Java home: /home/sschroevers/tools/jdk1.8.0_77/jre
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "3.19.0-32-generic", arch: "amd64", family: "unix"
   $ grep -P '^(model name|cpu cores|siblings)' /proc/cpuinfo | sort -u
   cpu cores    : 4
   model name   : Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
   siblings     : 8
   ```
   
   The produced GC logs are [attached|^memory-usage-test-gc-logs.tgz]. The 
script's output is shown below:
   
   ```
   Testing maven-source-plugin:2.4:jar-no-fork with 128m:
   Total time: 2.834 s
   Final Memory: 37M/114M
   Testing maven-source-plugin:2.4:jar-no-fork with 256m:
   Total time: 2.706 s
   Final Memory: 37M/224M
   Testing maven-source-plugin:2.4:jar-no-fork with 512m:
   Total time: 2.398 s
   Final Memory: 41M/327M
   Testing maven-source-plugin:2.4:jar-no-fork with 1024m:
   Total time: 2.545 s
   Final Memory: 46M/452M
   Testing maven-source-plugin:2.4:jar-no-fork with 2048m:
   Total time: 2.879 s
   Final Memory: 43M/429M
   Testing maven-source-plugin:2.4:jar-no-fork with 4096m:
   Total time: 2.514 s
   Final Memory: 43M/429M
   Testing maven-source-plugin:3.0.0:jar-no-fork with 128m:
   Total time: 3.736 s
   Final Memory: 64M/114M
   java.lang.OutOfMemoryError: Java heap space
   Testing maven-source-plugin:3.0.0:jar-no-fork with 256m:
   Total time: 13.748 s
   Final Memory: 38M/236M
   Testing maven-source-plugin:3.0.0:jar-no-fork with 512m:
   Total time: 8.835 s
   Final Memory: 38M/423M
   Testing maven-source-plugin:3.0.0:jar-no-fork with 1024m:
   Total time: 4.814 s
   Final Memory: 39M/644M
   Testing maven-source-plugin:3.0.0:jar-no-fork with 2048m:
   Total time: 4.630 s
   Final Memory: 40M/879M
   Testing maven-source-plugin:3.0.0:jar-no-fork with 4096m:
   Total time: 4.255 s
   Final Memory: 44M/1483M
   ```
   
   As you can see the old plugin ran comfortably in 128MB, while the new plugin 
requires at least 256MB and is 50% slower even when given 4GB. Unsurprisingly, 
the GC behavior logged for the old plugin is also much nicer than for the new 
plugin.
   
   NB: I have seen a similar OOM with the just-released 
`maven-jar-plugin:3.0.0`, but haven't yet been able to create a self-contained 
reproduction case. Anyway, the issue might thus be in a dependency shared 
between these plugins.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to