Skip to content

Commit adaa9da

Browse files
committed
Enhancements to the CRD fields to set JVM heap size
1 parent 5e5d31f commit adaa9da

File tree

11 files changed

+4316
-3830
lines changed

11 files changed

+4316
-3830
lines changed

deploy/crds/coherence.oracle.com_coherence_crd.yaml

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6507,26 +6507,46 @@ spec:
65076507
JVM option. If not set the JVM defaults are used.
65086508
type: string
65096509
heapSize:
6510-
description: HeapSize is the min/max heap value to pass to
6511-
the JVM. The format should be the same as that used for
6512-
Java's -Xms and -Xmx JVM options. If not set the JVM defaults
6513-
are used.
6510+
description: "HeapSize sets both the initial and max heap
6511+
size values for the JVM. This will set both the -XX:InitialHeapSize
6512+
and -XX:MaxHeapSize JVM options to the same value (the equivalent
6513+
of setting -Xms and -Xmx to the same value). \n The format
6514+
should be the same as that used when specifying these JVM
6515+
options. \n If not set the JVM defaults are used."
6516+
type: string
6517+
initialHeapSize:
6518+
description: "InitialHeapSize sets the initial heap size value
6519+
for the JVM. This will set the -XX:InitialHeapSize JVM option
6520+
(the equivalent of setting -Xms). \n The format should be
6521+
the same as that used when specifying this JVM options.
6522+
\n NOTE: If the HeapSize field is set it will override this
6523+
field."
65146524
type: string
65156525
initialRAMPercentage:
65166526
anyOf:
65176527
- type: integer
65186528
- type: string
65196529
description: "Set initial heap size as a percentage of total
6520-
memory. \n This option will be ignored if HeapSize is set.
6521-
\n Valid values are decimal numbers between 0 and 100. \n
6522-
NOTE: This field is a k8s resource.Quantity value as CRDs
6523-
do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
6530+
memory. \n The JVM will ignore this option if any of the
6531+
HeapSize, InitialHeapSize or MaxHeapSize options have been
6532+
set. \n Valid values are decimal numbers between 0 and 100.
6533+
\n NOTE: If the Percentage field is set it will override
6534+
this field. \n NOTE: This field is a k8s resource.Quantity
6535+
value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
65246536
for the different formats of number that may be entered.
6525-
\n NOTE: This field maps the the -XX:InitialRAMPercentage
6537+
\n NOTE: This field maps to the -XX:InitialRAMPercentage
65266538
JVM option and will be incompatible with some JVMs that
65276539
do not have this option (e.g. Java 8)."
65286540
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
65296541
x-kubernetes-int-or-string: true
6542+
maxHeapSize:
6543+
description: "MaxHeapSize sets the maximum heap size value
6544+
for the JVM. This will set the -XX:MaxHeapSize JVM option
6545+
(the equivalent of setting -Xmx). \n The format should be
6546+
the same as that used when specifying this JVM options.
6547+
\n NOTE: If the HeapSize field is set it will override this
6548+
field."
6549+
type: string
65306550
maxRAM:
65316551
description: Sets the JVM option `-XX:MaxRAM=N` which sets
65326552
the maximum amount of memory used by the JVM to `n`, where
@@ -6538,12 +6558,14 @@ spec:
65386558
- type: integer
65396559
- type: string
65406560
description: "Set maximum heap size as a percentage of total
6541-
memory. \n This option will be ignored if HeapSize is set.
6542-
\n Valid values are decimal numbers between 0 and 100. \n
6543-
NOTE: This field is a k8s resource.Quantity value as CRDs
6544-
do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
6561+
memory. \n The JVM will ignore this option if any of the
6562+
HeapSize, InitialHeapSize or MaxHeapSize options have been
6563+
set. \n Valid values are decimal numbers between 0 and 100.
6564+
\n NOTE: If the Percentage field is set it will override
6565+
this field. \n NOTE: This field is a k8s resource.Quantity
6566+
value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
65456567
for the different formats of number that may be entered.
6546-
\n NOTE: This field maps the the -XX:MaxRAMPercentage JVM
6568+
\n NOTE: This field maps to the -XX:MaxRAMPercentage JVM
65476569
option and will be incompatible with some JVMs that do not
65486570
have this option (e.g. Java 8)."
65496571
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -6587,6 +6609,26 @@ spec:
65876609
OOM error occurs. Default is true
65886610
type: boolean
65896611
type: object
6612+
percentage:
6613+
anyOf:
6614+
- type: integer
6615+
- type: string
6616+
description: "Percentage sets the initial and maximum and
6617+
minimum heap percentage sizes to the same value, This will
6618+
set the -XX:InitialRAMPercentage -XX:MinRAMPercentage and
6619+
-XX:MaxRAMPercentage JVM options to the same value. \n The
6620+
JVM will ignore this option if any of the HeapSize, InitialHeapSize
6621+
or MaxHeapSize options have been set. \n Valid values are
6622+
decimal numbers between 0 and 100. \n NOTE: This field is
6623+
a k8s resource.Quantity value as CRDs do not support decimal
6624+
numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
6625+
for the different formats of number that may be entered.
6626+
\n NOTE: This field maps to the -XX:InitialRAMPercentage
6627+
-XX:MinRAMPercentage and -XX:MaxRAMPercentage JVM options
6628+
and will be incompatible with some JVMs that do not have
6629+
this option (e.g. Java 8)."
6630+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
6631+
x-kubernetes-int-or-string: true
65906632
stackSize:
65916633
description: StackSize is the stack size value to pass to
65926634
the JVM. The format should be the same as that used for

deploy/crds/v1beta1/coherence.oracle.com_coherence_crd.yaml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6393,26 +6393,44 @@ spec:
63936393
option. If not set the JVM defaults are used.
63946394
type: string
63956395
heapSize:
6396-
description: HeapSize is the min/max heap value to pass to the
6397-
JVM. The format should be the same as that used for Java's
6398-
-Xms and -Xmx JVM options. If not set the JVM defaults are
6399-
used.
6396+
description: "HeapSize sets both the initial and max heap size
6397+
values for the JVM. This will set both the -XX:InitialHeapSize
6398+
and -XX:MaxHeapSize JVM options to the same value (the equivalent
6399+
of setting -Xms and -Xmx to the same value). \n The format
6400+
should be the same as that used when specifying these JVM
6401+
options. \n If not set the JVM defaults are used."
6402+
type: string
6403+
initialHeapSize:
6404+
description: "InitialHeapSize sets the initial heap size value
6405+
for the JVM. This will set the -XX:InitialHeapSize JVM option
6406+
(the equivalent of setting -Xms). \n The format should be
6407+
the same as that used when specifying this JVM options. \n
6408+
NOTE: If the HeapSize field is set it will override this field."
64006409
type: string
64016410
initialRAMPercentage:
64026411
anyOf:
64036412
- type: integer
64046413
- type: string
64056414
description: "Set initial heap size as a percentage of total
6406-
memory. \n This option will be ignored if HeapSize is set.
6407-
\n Valid values are decimal numbers between 0 and 100. \n
6415+
memory. \n The JVM will ignore this option if any of the HeapSize,
6416+
InitialHeapSize or MaxHeapSize options have been set. \n Valid
6417+
values are decimal numbers between 0 and 100. \n NOTE: If
6418+
the Percentage field is set it will override this field. \n
64086419
NOTE: This field is a k8s resource.Quantity value as CRDs
64096420
do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
64106421
for the different formats of number that may be entered. \n
6411-
NOTE: This field maps the the -XX:InitialRAMPercentage JVM
6422+
NOTE: This field maps to the -XX:InitialRAMPercentage JVM
64126423
option and will be incompatible with some JVMs that do not
64136424
have this option (e.g. Java 8)."
64146425
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
64156426
x-kubernetes-int-or-string: true
6427+
maxHeapSize:
6428+
description: "MaxHeapSize sets the maximum heap size value for
6429+
the JVM. This will set the -XX:MaxHeapSize JVM option (the
6430+
equivalent of setting -Xmx). \n The format should be the same
6431+
as that used when specifying this JVM options. \n NOTE: If
6432+
the HeapSize field is set it will override this field."
6433+
type: string
64166434
maxRAM:
64176435
description: Sets the JVM option `-XX:MaxRAM=N` which sets the
64186436
maximum amount of memory used by the JVM to `n`, where `n`
@@ -6424,12 +6442,14 @@ spec:
64246442
- type: integer
64256443
- type: string
64266444
description: "Set maximum heap size as a percentage of total
6427-
memory. \n This option will be ignored if HeapSize is set.
6428-
\n Valid values are decimal numbers between 0 and 100. \n
6445+
memory. \n The JVM will ignore this option if any of the HeapSize,
6446+
InitialHeapSize or MaxHeapSize options have been set. \n Valid
6447+
values are decimal numbers between 0 and 100. \n NOTE: If
6448+
the Percentage field is set it will override this field. \n
64296449
NOTE: This field is a k8s resource.Quantity value as CRDs
64306450
do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
64316451
for the different formats of number that may be entered. \n
6432-
NOTE: This field maps the the -XX:MaxRAMPercentage JVM option
6452+
NOTE: This field maps to the -XX:MaxRAMPercentage JVM option
64336453
and will be incompatible with some JVMs that do not have this
64346454
option (e.g. Java 8)."
64356455
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -6473,6 +6493,24 @@ spec:
64736493
OOM error occurs. Default is true
64746494
type: boolean
64756495
type: object
6496+
percentage:
6497+
anyOf:
6498+
- type: integer
6499+
- type: string
6500+
description: "Percentage sets the initial and maximum and minimum
6501+
heap percentage sizes to the same value, This will set the
6502+
-XX:InitialRAMPercentage -XX:MinRAMPercentage and -XX:MaxRAMPercentage
6503+
JVM options to the same value. \n The JVM will ignore this
6504+
option if any of the HeapSize, InitialHeapSize or MaxHeapSize
6505+
options have been set. \n Valid values are decimal numbers
6506+
between 0 and 100. \n NOTE: This field is a k8s resource.Quantity
6507+
value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity
6508+
for the different formats of number that may be entered. \n
6509+
NOTE: This field maps to the -XX:InitialRAMPercentage -XX:MinRAMPercentage
6510+
and -XX:MaxRAMPercentage JVM options and will be incompatible
6511+
with some JVMs that do not have this option (e.g. Java 8)."
6512+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
6513+
x-kubernetes-int-or-string: true
64766514
stackSize:
64776515
description: StackSize is the stack size value to pass to the
64786516
JVM. The format should be the same as that used for Java's

docs/about/04_coherence_spec.adoc

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,26 +321,53 @@ Options for managing the JVM memory.
321321
[cols="1,10,1,1"options="header"]
322322
|===
323323
| Field | Description | Type | Required
324-
m| heapSize | HeapSize is the min/max heap value to pass to the JVM. The format should be the same as that used for Java's -Xms and -Xmx JVM options. If not set the JVM defaults are used. m| *string | false
324+
m| heapSize | HeapSize sets both the initial and max heap size values for the JVM. This will set both the -XX:InitialHeapSize and -XX:MaxHeapSize JVM options to the same value (the equivalent of setting -Xms and -Xmx to the same value). +
325+
+
326+
The format should be the same as that used when specifying these JVM options. +
327+
+
328+
If not set the JVM defaults are used. m| *string | false
329+
m| initialHeapSize | InitialHeapSize sets the initial heap size value for the JVM. This will set the -XX:InitialHeapSize JVM option (the equivalent of setting -Xms). +
330+
+
331+
The format should be the same as that used when specifying this JVM options. +
332+
+
333+
NOTE: If the HeapSize field is set it will override this field. m| *string | false
334+
m| maxHeapSize | MaxHeapSize sets the maximum heap size value for the JVM. This will set the -XX:MaxHeapSize JVM option (the equivalent of setting -Xmx). +
335+
+
336+
The format should be the same as that used when specifying this JVM options. +
337+
+
338+
NOTE: If the HeapSize field is set it will override this field. m| *string | false
325339
m| maxRAM | Sets the JVM option `-XX:MaxRAM=N` which sets the maximum amount of memory used by the JVM to `n`, where `n` is expressed in terms of megabytes (for example, `100m`) or gigabytes (for example `2g`). m| *string | false
340+
m| percentage | Percentage sets the initial and maximum and minimum heap percentage sizes to the same value, This will set the -XX:InitialRAMPercentage -XX:MinRAMPercentage and -XX:MaxRAMPercentage JVM options to the same value. +
341+
+
342+
The JVM will ignore this option if any of the HeapSize, InitialHeapSize or MaxHeapSize options have been set. +
343+
+
344+
Valid values are decimal numbers between 0 and 100. +
345+
+
346+
NOTE: This field is a k8s resource.Quantity value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity for the different formats of number that may be entered. +
347+
+
348+
NOTE: This field maps to the -XX:InitialRAMPercentage -XX:MinRAMPercentage and -XX:MaxRAMPercentage JVM options and will be incompatible with some JVMs that do not have this option (e.g. Java 8). m| *resource.Quantity | false
326349
m| initialRAMPercentage | Set initial heap size as a percentage of total memory. +
327350
+
328-
This option will be ignored if HeapSize is set. +
351+
The JVM will ignore this option if any of the HeapSize, InitialHeapSize or MaxHeapSize options have been set. +
329352
+
330353
Valid values are decimal numbers between 0 and 100. +
331354
+
355+
NOTE: If the Percentage field is set it will override this field. +
356+
+
332357
NOTE: This field is a k8s resource.Quantity value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity for the different formats of number that may be entered. +
333358
+
334-
NOTE: This field maps the the -XX:InitialRAMPercentage JVM option and will be incompatible with some JVMs that do not have this option (e.g. Java 8). m| *resource.Quantity | false
359+
NOTE: This field maps to the -XX:InitialRAMPercentage JVM option and will be incompatible with some JVMs that do not have this option (e.g. Java 8). m| *resource.Quantity | false
335360
m| maxRAMPercentage | Set maximum heap size as a percentage of total memory. +
336361
+
337-
This option will be ignored if HeapSize is set. +
362+
The JVM will ignore this option if any of the HeapSize, InitialHeapSize or MaxHeapSize options have been set. +
338363
+
339364
Valid values are decimal numbers between 0 and 100. +
340365
+
366+
NOTE: If the Percentage field is set it will override this field. +
367+
+
341368
NOTE: This field is a k8s resource.Quantity value as CRDs do not support decimal numbers. See https://godoc.org/k8s.io/apimachinery/pkg/api/resource#Quantity for the different formats of number that may be entered. +
342369
+
343-
NOTE: This field maps the the -XX:MaxRAMPercentage JVM option and will be incompatible with some JVMs that do not have this option (e.g. Java 8). m| *resource.Quantity | false
370+
NOTE: This field maps to the -XX:MaxRAMPercentage JVM option and will be incompatible with some JVMs that do not have this option (e.g. Java 8). m| *resource.Quantity | false
344371
m| minRAMPercentage | Set the minimal JVM Heap size as a percentage of the total memory. +
345372
+
346373
This option will be ignored if HeapSize is set. +

0 commit comments

Comments
 (0)