JDK-6245770 : Reduce default code cache sizes on 64-bit platforms
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-03-24
  • Updated: 2012-10-13
  • Resolved: 2005-04-13
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.
Other JDK 6
1.4.2_11Fixed 6 b32Fixed
For sparc32 and x86, InitialCodeCacheSize = 160kb and
ReservedCodeCacheSize = 32mb.  For sparc64, amd64,
and ia64 the values are 1mb and 1gb, which seem (except
maybe for ia64) relatively too large.  Sun's System
Resource Manager counts reserved memory as actual memory
allocated, even though only committed memory actually
takes up swap.  So SRM can refuse to run the vm if its
va limit is set too low.

For sparc64 and amd64, we can drop them to double
the 32-bit values: 320kb and 64mb.  The code expansion
from 32-bit to 64-bit in each case is less than double,
nor do I believe that we compile any more methods in
64-bit mode than in 32-bit mode.  If anyone's worried
that double is too small, triple (480kb and 96mb) would
be ok too.  Or, we could use triple initial and double reserved
(480kb and 64mb).

###@###.### 2005-03-24 21:22:02 GMT

EVALUATION Code cache sizes in kb upon shutdown, server vm, running -version and jbb2k i486 amd64 sparc sparcv9 ia64 -version 320 640 352 640 544 jbb2k 2272 2496 1536 2048 2080 -------------------------------------------------------- diff 1952 1856 1184 1408 1536 sparcv9/sparc = 1.19 amd64/i486 = 1.10 ia64/sparc = 1.30 jbb2k doesn't generate a huge amount of code, relatively speaking. Also, all the code that's ever going to be compiled has been compiled by the end of jbb2k. Based on the above, it seems reasonable to set InitialCodeCacheSize to the jbb2k values above, and ReservedCodeCacheSize for sparc to 32mb (the current value), for i486, sparcv9 and amd64 to 48mb and for ia64 to 64mb. ###@###.### 2005-03-30 23:22:51 GMT The jbb2k code cache sizes reflect processor speed to some extent, because running faster will trip more profiling counters. Initial code cache sizes should be revisited every few years. ###@###.### 2005-03-30 23:46:12 GMT