About Capacity Units for Oracle Java Cloud Service—Coherence Instances

Oracle Java Cloud Service uses capacity units to provision Oracle WebLogic Server and Oracle Coherence environments that provide a preconfigured amount of Coherence cache capacity. A capacity unit is a group of virtual machines (VMs) running a number of JVMs (Managed Coherence Servers), and is meant to scale linearly in the context of your application. Capacity is defined as a fixed amount of primary cache storage to allocate for Coherence, based on the general rule of splitting the JVM heap size into thirds, using 1/3rd for primary cache storage, 1/3rd for backup storage, and 1/3rd for scratch space.

Topics:

When provisioning an Oracle Java Cloud Service—Coherence instance, a capacity unit must be declared for the service instance. A capacity unit is a well-defined unit of VMs and JVMs, preconfigured by properties that specify:

  • The processing power of the VMs to provision on the Coherence data tier of the WebLogic Server domain

  • The amount of primary cache storage to allocate for Coherence

When provisioning a service instance using the Create Java Cloud Service wizard, you can choose from a list of default capacity unit definitions (for example, Basic, Small, Medium, or Large) or define a custom capacity unit that meets your resource requirements. Each default capacity unit definition provides a different amount of primary cache capacity for Coherence, based on the number of VMs and JVMs configured in the unit. Each default capacity unit (except the Basic configuration) is defined as a group of three VMs to provide a high availability (HA) unit, three being the smallest unit of VMs that will provide Coherence HA. When using a custom capacity unit, Coherence HA is achieved when you specify three VMs per custom unit. After a service instance has been provisioned, you can’t change the default capacity unit you used or the configuration of a custom capacity unit you defined.

Note:

  • Only one capacity unit is provisioned upon initial creation of an Oracle Java Cloud Service—Coherence instance. The default capacity unit you choose or the custom unit you define during provisioning determines how Oracle Java Cloud Service scales the service instance when you initiate a scaling operation on the Coherence data tier.

  • Based on the capacity unit definition declared for the service instance, a scaling operation always increases or decreases the total cache capacity for Coherence by a preconfigured, fixed amount, adding or removing a group of VMs at a time.

About Properties of a Capacity Unit Definition

Oracle Java Cloud Service uses a capacity unit to create the Coherence data tier when you enable Oracle Coherence for a service instance during provisioning. A capacity unit definition has properties that determine the amount of Coherence cache capacity to provide, based on how the VMs, JVMs, and JVM heap are configured.

When creating an Oracle Java Cloud Service—Coherence instance, you don’t have to worry about defining any properties if you use a default capacity unit.

If you want to define your own configuration for a custom capacity unit (by using Advanced configuration during provisioning), you will have to specify a collection of properties for the custom unit.

The properties of a default or custom capacity unit definition are:

  • VM count: Each capacity unit has a predefined number of VMs.

  • VM shape: Each VM has the same shape. A shape, which is the number of Oracle Compute Units (OCPUs) and amount of RAM, determines the processing power of the VM and the amount of memory available for JVM heap. For example, the shape oc3 has 1 OCPU and 7.5 GB of memory.

  • JVM count: Each VM is configured to run the same number of JVMs (Managed Coherence Servers).

  • JVM heap: The same heap size is configured with each JVM. The memory available for heap is 75% of the remaining shape memory after reserving 1.5 GB for the operating system. The heap size per JVM is the available memory divided by the number of JVMs per capacity unit. The general rule is to use 1/3rd of heap for primary cache storage.

The cache size or cache capacity of a capacity unit is the amount of primary cache storage to configure for Coherence, which is based on:

  • The predefined number of JVMs (Managed Coherence Servers) on each VM

  • The predefined heap size on each JVM (Managed Coherence Server)

Note:

Only one capacity unit of VMs and JVMs is provisioned and configured upon initial creation of an Oracle Java Cloud Service—Coherence instance. To increase the cache capacity provided by a service instance, you scale out the Coherence data tier by adding one capacity unit at a time.

About Default Capacity Units for Oracle Java Cloud Service—Coherence Instances

When you provision an Oracle Java Cloud Service instance using the Create Java Cloud Service wizard, you can use a default capacity unit to enable Oracle Coherence for the service instance. Oracle Java Cloud Service provides a set of default capacity units that are optimized for different use cases.

Each default capacity unit definition provides a different combination of primary cache storage and VM processing power that fits most application and workflow requirements.

A default capacity unit has:

  • A name (for example, Basic, Small, Medium, or Large)

  • A shape (for example, low or high processing power, and standard memory or memory-intensive)

  • A cache capacity or cache size, which is a fixed amount of primary cache storage to allocate for Coherence, based on the unit's predefined properties for number of VMs, number of JVMs per VM, and heap size for each JVM.

With the exception of the Basic definition, a default capacity unit is a group of three VMs, which is the smallest unit that will provide Coherence high availability. The Basic definition is configured with one VM only.

Use the following capacity unit properties to help you decide which default capacity unit definition to use:

Default Capacity Unit Name Number of VMs per Unit Shape OCPUs Memory (RAM in GB) Number of JVMs per VM Heap Size per JVM (MB) Total Primary Cache (MB) per Unit

Basic (non-HA)

1

oc3

1

7.5

1

4608

1536

Small

3

oc3

1

7.5

1

4608

4608

Medium

3

oc4

2

15

2

5120

10240

Large

3

oc5

4

30

4

5632

22528

Note the following when using a default capacity unit:

  • The amount of memory for JVM heap is based on a shape’s memory (RAM). The total memory that’s used for heap configuration is 75% of the remaining shape memory after reserving 1.5 GB for the operating system. The heap size per JVM is the available memory divided by the number of JVMs per capacity unit.

  • The total primary cache storage to allocate for Coherence is based on the general rule of splitting the JVM heap size into thirds, using 1/3rd for primary cache storage, 1/3rd for backup storage, and 1/3rd for scratch space.

  • Only one capacity unit of VMs and JVMs is provisioned and configured upon initial creation of an Oracle Java Cloud Service—Coherence instance. To increase the cache capacity provided by a service instance, you scale out the Coherence data tier by adding one capacity unit at a time.

  • The smaller the cache size of a capacity unit (total primary cache capacity), the smaller the cache increment (or decrement) by which the cluster will grow (or shrink) when you initiate a scaling operation on the cluster.

  • You can scale out the cluster to the maximum cache capacity supported by the data center site.

About Custom Capacity Units and Advanced Configuration for Oracle Java Cloud Service—Coherence Instances

When you provision an Oracle Java Cloud Service—Coherence instance using the Create Java Cloud Service wizard, instead of using a default capacity unit, you can choose the Advanced option and then define your own properties for a custom capacity unit.

When defining a custom capacity unit in the Create Java Cloud Service wizard, use these guidelines when you specify the following properties:

Property Description Guideline

Shape

The compute shape to use for VMs on the Coherence data tier. All VMs have the same shape, which is the number of Oracle Compute Units (OCPUs) and amount of RAM (system memory) available for a VM instance.

 

Nodes

The number of VMs to configure per capacity unit.

Depending on the given Compute Shape, use a number from 1 to 3.

To achieve Coherence high availability, select 3. This is because three is the smallest number of VMs that will provide Coherence high availability.

Managed Servers per Node

The number of JVMs or Managed Coherence Servers to start on each VM for the selected Compute Shape. All VMs have the same number of JVMs.

Depending on the given shape, use a number from 1 to 8.

Using more servers can improve concurrency and memory management but can require more processors.

The maximum number of servers you can configure per VM is based on using the minimum of 1 GB for individual JVM heap size. For example, if the memory available for heap is 4.5 GB, then the maximum number of servers you can select is 4.

Consider the following when defining a custom capacity unit:

  • The memory available for JVM heap configuration is based on a shape’s memory (RAM). The total memory that’s available is 75% of the remaining shape memory after reserving 1.5 GB for the operating system. The heap size to configure for each JVM is the available memory divided by the number of JVMs per unit.

    For example, if a capacity unit uses a shape that has 7.5 GB of memory, the memory available for heap configuration is 75% of 6 GB or 4.5 GB. If the capacity unit is predefined with 1 VM and is configured to run 2 JVMs per VM, then the heap size per JVM is half of 4.5 GB or 2.25 GB.

    When you provision a service instance using the service creation wizard available through the Oracle Java Cloud Service Console, the maximum individual heap size that will be configured is 16 GB. While you can use the WebLogic Server Administration Console to increase the heap size after the service instance is created, the change is not reflected in the Oracle Java Cloud Service Console or capacity unit definition for your service instance. When you initiate a scale out operation, the original heap size will be configured for new JVMs.

  • As with default capacity units, the total amount of primary cache storage to allocate for Coherence in the domain is based on the general rule of splitting the JVM heap size into thirds, using 1/3rd for primary cache storage, 1/3rd for backup storage, and 1/3rd for scratch space.

    Following the example described earlier: Provisioning one capacity unit would provide (4.5/3) or 1.5 GB of primary cache to allocate for Coherence.

    However, if your custom capacity unit is configured with a single VM, there might not be space to store a backup copy of the Coherence data, so the actual data available might be more than 1/3 of the JVM heap size.

  • The larger the cache size of a capacity unit (total primary cache capacity), the larger the cache increment (or decrement) by which the cluster will grow (or shrink) when you initiate a scaling operation on the cluster.

Note:

Only one capacity unit of VMs and JVMs is provisioned and configured upon initial creation of an Oracle Java Cloud Service—Coherence instance. To increase the cache capacity provided by a service instance, you scale out the Coherence data tier by adding one capacity unit at a time.