JDK-8213086 : Compiler thread creation should be bounded by available space in memory and Code Cache
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-29
  • Updated: 2022-01-05
  • Resolved: 2018-10-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.3Fixed 12 b18Fixed
Related Reports
Relates :  
Relates :  
Description
Since JDK-8198756, compiler threads are created/removed at runtime depending on the compile queue length.
They were supposed to be limited by the available memory, too, but there's a bug in the limiting function (missing braces).

We should also make this dependent on the available space in the code cache because it does not make sense to add more compiler threads if there is almost no space for compiled code and scratch buffers left (JDK-8177899).

Comments
Fix Request This is a small fix for JDK-8198756 which is part of jdk11. Compile broker may start an inappropriate number of compiler threads. Fix has been tested in the official jdk12 and in our internal jdk11u tests. Applies cleanly.
05-11-2018

URL: http://hg.openjdk.java.net/jdk/jdk/rev/9e3fd0cc3936 User: mdoerr Date: 2018-10-31 13:55:51 +0000
31-10-2018

ILW = -XX:+UseDynamicNumberOfCompilerThreads might create too many compiler threads, on systems with low memory, no workaround = MLH = P4
30-10-2018

available_memory / 200*M = (available_memory / 200) * M Should be: available_memory / (200*M)
29-10-2018

Where is a bug in the limiting function (missing braces)?
29-10-2018