Skip to content

Commit

Permalink
HBASE-23779 Up the default fork count to make builds complete faster;…
Browse files Browse the repository at this point in the history
… make count relative to CPU count

Halve the build speed by doubling the -C count from 0.25C to 0.5C.
Pass mvn a -T of 0.5C too.
  • Loading branch information
saintstack committed Apr 9, 2020
1 parent 611c62f commit cabd6e9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
14 changes: 13 additions & 1 deletion dev-support/hbase-personality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,19 @@ function personality_modules

clear_personality_queue

extra="-DHBasePatchProcess"
# Set a fork count based off the host cpu count. Could pass maven a -T
# argument to more than one module at at a time but lets be conservative
# and default for now. There currently is little opportunity for parallel
# module builds in hbase currently (mapreduce and thrift modules can run
# concurrently and a few others but not much else). 0.5C for fork count on
# an apache 'hadoop' box of 16 cores with 2 jenkins 'executors' per host
# should make for 8 threads and so 8 concurrent forked JVMs running tests.
# Setting this here for yetus to pick up. See
# https://yetus.apache.org/documentation/0.11.1/precommit-advanced/#global-definitions
# See below for more on -T:
# https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3
forkcount="0.5C"
extra="-Dsurefire.firstPartForkCount=${forkcount} -Dsurefire.secondPartForkCount=${forkcount} -DHBasePatchProcess"
if [[ "${PATCH_BRANCH}" = branch-1* ]]; then
extra="${extra} -Dhttps.protocols=TLSv1.2"
fi
Expand Down
19 changes: 10 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1409,17 +1409,18 @@
<!-- default: run small & medium, medium with 2 threads -->
<surefire.skipFirstPart>false</surefire.skipFirstPart>
<surefire.skipSecondPart>false</surefire.skipSecondPart>
<!-- Fork count varies w/ CPU count. Setting is conservative mostly determined
by what apache jenkins nightly builds will tolerate (See HBASE-24072). Up this
<!--
Fork count varies w/ CPU count. Setting is conservative mostly determined
by what apache jenkins nightly builds will tolerate (See HBASE-24072). Up this
value is you want to burn through tests faster (could make for more failures
if more contention around resources). There is a matching MAVEN_ARG
in our yetus personality where we set the maven -T command to 0.25C too.
For example, to run at a rate that is more furious than our 0.25C, do
something like this:
f="0.5C" ; mvn -T$f -Dsurefire.firstPartForkCount=$f -Dsurefire.secondPartForkCount=$f test -PrunAllTests
if more contention around resources). For example, to run at a rate that is
more furious than our 0.5C, do something like this:
f="0.75C" ; mvn -Dsurefire.firstPartForkCount=$f -Dsurefire.secondPartForkCount=$f test -PrunAllTests
Note, tests seem to crash or fail nonsensically if the fork count is set too
high. On high-CPU boxes, a fork count of 1.0 doesn't always 'work'.
-->
<surefire.firstPartForkCount>0.25C</surefire.firstPartForkCount>
<surefire.secondPartForkCount>0.25C</surefire.secondPartForkCount>
<surefire.firstPartForkCount>0.5C</surefire.firstPartForkCount>
<surefire.secondPartForkCount>0.5C</surefire.secondPartForkCount>
<surefire.firstPartGroups>org.apache.hadoop.hbase.testclassification.SmallTests</surefire.firstPartGroups>
<surefire.secondPartGroups>org.apache.hadoop.hbase.testclassification.MediumTests</surefire.secondPartGroups>
<surefire.testFailureIgnore>false</surefire.testFailureIgnore>
Expand Down

0 comments on commit cabd6e9

Please sign in to comment.