Skip to content

Commit

Permalink
Reduce counts when running without SCC and many CPUs are available
Browse files Browse the repository at this point in the history
When the shared class cache feature is not used, the default invocation counts
are count=3000,bcount=3000. They are rather large to allow for enough interpreter
profiling information to be collected. However, this affects the rampup of
Java applications because the transition from interpreter to jitted code is delayed.
Recent experiments have shown that it is possible to reduce the counts from
(3000,3000) to (2000,1000) without affecting the long term throughput.
Because lower invocation counts means more compilations, we can afford to lower the
counts only when we have enough computing power. In this PR the default
invocation counts will be lowered to (2000,1000) only when there are 4 CPUs
or more available.

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
  • Loading branch information
mpirvu committed Feb 28, 2020
1 parent 64aaf51 commit 2d3c070
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4073,7 +4073,7 @@ OMR::Options::setCounts()
}
else // Use higher count
{
_initialCount = TR_DEFAULT_INITIAL_COUNT;
_initialCount = TR::Compiler->target.numberOfProcessors() >= TR_NUMPROC_FOR_LARGE_SMP ? TR_LARGE_SMP_INITIAL_COUNT : TR_DEFAULT_INITIAL_COUNT;
}
}
else
Expand All @@ -4096,7 +4096,7 @@ OMR::Options::setCounts()
}
else
{
_initialBCount = TR_DEFAULT_INITIAL_BCOUNT;
_initialBCount = TR::Compiler->target.numberOfProcessors() >= TR_NUMPROC_FOR_LARGE_SMP ? TR_LARGE_SMP_INITIAL_BCOUNT: TR_DEFAULT_INITIAL_BCOUNT;
}
_initialBCount = std::min(_initialBCount, _initialCount);
}
Expand Down
4 changes: 4 additions & 0 deletions compiler/control/OMROptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,10 @@ enum TR_ProcessOptionsFlags
#define TR_DEFAULT_INITIAL_BCOUNT 3000
#define TR_DEFAULT_INITIAL_MILCOUNT 250

#define TR_LARGE_SMP_INITIAL_COUNT 2000
#define TR_LARGE_SMP_INITIAL_BCOUNT 1000
#define TR_NUMPROC_FOR_LARGE_SMP 4 // Minimum number of CPUs to declare this environment as a "large SMP"

#define TR_QUICKSTART_INITIAL_COUNT 1000
#define TR_QUICKSTART_INITIAL_BCOUNT 250
#define TR_QUICKSTART_INITIAL_MILCOUNT 1
Expand Down

0 comments on commit 2d3c070

Please sign in to comment.