RFR: 8284900: Check InitialHeapSize and container memory limits before startup
Jie Fu
jiefu at openjdk.java.net
Fri Apr 15 03:55:39 UTC 2022
On Fri, 15 Apr 2022 03:27:21 GMT, xpbob <duke at openjdk.java.net> wrote:
> Check InitialHeapSize and container memory limits before startup
>
>
> Operating System Metrics:
> Provider: cgroupv1
> Effective CPU Count: 8
> CPU Period: 100000us
> CPU Quota: -1
> CPU Shares: -1
> List of Processors, 8 total:
> 0 1 2 3 4 5 6 7
> List of Effective Processors: N/A
> List of Memory Nodes, 1 total:
> 0
> List of Available Memory Nodes: N/A
> Memory Limit: 50.00M
> Memory Soft Limit: Unlimited
> Memory & Swap Limit: Unlimited
> Maximum Processes Limit: 4194305
>
> command:-Xms50m -XshowSettings:system -version
>
> When the memory limit is exceeded, the startup fails
>
>
> Error occurred during initialization of VM
> Initial heap size set to a larger value than the os or container memory
src/hotspot/share/gc/shared/gcArguments.cpp line 130:
> 128: }
> 129:
> 130: if (FLAG_IS_CMDLINE(InitialHeapSize) && InitialHeapSize >= os::physical_memory()) {
What will happen if the swap space is unlimited?
Memory Soft Limit: Unlimited
Memory & Swap Limit: Unlimited
-------------
PR: https://git.openjdk.java.net/jdk/pull/8256
More information about the hotspot-gc-dev
mailing list