Skip to content

Commit ed055c3

Browse files
committed
Update Readme
1 parent 2848c12 commit ed055c3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ cd maven
4848
mvn -DdistributionTargetDir="{maven-distrib-location}/apache-maven-head" clean package
4949
```
5050

51+
Heap size is fixed with the help of [@HeapSize](https://github.com/quick-perf/doc/wiki/JVM-annotations#heapsize).
52+
5153
# Benchmark heap allocation of several Maven releases
5254

5355
`MvnValidateAllocationByMaven3VersionTest` test allows to benchmark the heap allocation level on several Maven 3 distributions.
@@ -79,13 +81,13 @@ For this graph, you can consult:
7981
* [the measures](measures/maven-memory-allocation-2019-09-01-18-48-41.csv)
8082
* [the execution context](measures/execution-context-2019-09-01-18-48-41.txt)
8183

82-
Measures took 1 hour and 12 minutes. From Maven versions 3.2.5 to 3.6.2, heap allocation level is the highest with Maven 3.2.5 and the smallest with Maven 3.6.2. And __the heap allocation decreases from ~7 GB with Maven 3.6.1 to ~3 GB with Maven 3.6.2__.
84+
Measures took around one hour and a quarter.
85+
86+
From Maven versions 3.2.5 to 3.6.2, heap allocation level is the highest with Maven 3.2.5 and the smallest with Maven 3.6.2. *The heap allocation decreases from ~7 GB with Maven 3.6.1 to ~3 GB with Maven 3.6.2*.
8387

84-
JVM heap size can be fixed with the help of [@HeapSize](https://github.com/quick-perf/doc/wiki/JVM-annotations#heapsize):
85-
* with Maven 3.2.5 and a JVM heap size between 6 and 9 GB, one measure of heap allocation takes around one minute: the test duration is about 1.5 minute with a 5 GB heap size, probably due to more garbage collection,
86-
* __with Maven 3.6.2, the test duration drops to 15 seconds for a heap size between 1 and 9 GB__
88+
Control and reduce heap allocation is an important matter for Maven project. Indeed, a part of the heap allocation is going to be garbage collected and the garbage collection activity is succeptible to slow down your build. In addition, less heap allocation means that you may execute Maven with a smaller heap size.
8789

88-
Less heap allocation means you can allocate less memory, and given a memory allocation you get less garbage collection, then it takes less time: with QuickPerf, we were able to measure the improvement precisely.
90+
But where the allocation comes from? In the following part we will see how to spot the Java methods allocating a lot.
8991

9092
# Investigate where heap allocation comes from
9193

@@ -106,7 +108,7 @@ The recording file can be found here: C:\Users\JEANBI~1\AppData\Local\Temp\Quick
106108
You can open it with Java Mission Control (JMC).
107109
```
108110

109-
You can open it with Java Mission Control (JMC).
111+
You can open it with Java Mission Control (JMC) to discover the methods contributing the most to heap allocation.
110112

111113
Below a JFR file for Maven 3.2.5 and opened with JMC 5.5:
112114
<p align="center">

0 commit comments

Comments
 (0)