This page describes an older version of the product. The latest stable version is 14.5.

Deployment

The deployment of a partitioned (space based) EPU and stateless/web EPU is done via the Admin API.

In order for the deployment to work, the Admin API must first discover a running GSM, ESM (managers) and running GSAs (GigaSpaces agents).

// Wait for the discovery of the managers and at least one GigaSpaces agent
Admin admin = new AdminFactory().addGroup("myGroup").create();
admin.getGridServiceAgents().waitForAtLeastOne();
admin.getElasticServiceManagers().waitForAtLeastOne();
GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne();

Maximum Memory Capacity

The EPU deployment requires two important properties:

memoryCapacityPerContainer defines the Java Heap size of the Java Virtual Machine and is the most granular memory allocation deployment property. It is internally translated to:

The number of Processing Unit partitions cannot be changed without re-deployment of the PU.

Maximum Number of CPU Cores

In many cases when you should take the number of space operations per second into consideration when scaling the system. The memory utilization will be a secondary factor when calculating the required scale. For example, if the system performs mostly data updates (as opposed to reading data), the CPU resources could be a limiting factor more than the total memory capacity. In these cases use the maxNumberOfCpuCores deployment property. Here is a typical deployment example that includes CPU capacity planning:

The maxNumberOfCpuCores property provides an estimate for the maximum total number of CPU cores on machines that have one or more primary processing unit instances deployed (instances that are not in backup state). Internally the number of partitions is calculated as follows:

In order to evaluate the minNumberOfCpuCoresPerMachine, the deployment communicates with each discovered GigaSpaces agent and collects the number of CPU cores the operating system reports. In case a machine provisioning plugin (cloud) is used, the plugin provides that estimate instead. The minNumberOfCpuCoresPerMachine deployment property can also be explicitly defined.

Explicit Number of Partitions

The numberOfPartitions property allows explicit definition of the number of space partitions. When the numberOfPartitions property is defined then maxMemoryCapacity and maxNumberOfCpuCores should not be defined.

Specifying number of partitions explicitly is recommended only when fine grained scale triggers are required. The example below illustrating 12 partitions system (12 primaries + 12 backups = 24 instances). See how the system scales to have increased total memory capacity as a function of the number of Containers and memoryCapacityPerContainer:

Number of Containers

Number of partitions per container

Total available memory

2

24 / 2 = 12

2 * 6GB = 12GB

4

24 / 4 = 6

4 * 6GB = 24GB

8

24 / 8 = 3

8 * 6GB = 48GB

12

24 / 12 = 2

12 * 6GB = 72GB

Number of Containers

Number of partitions per container

Total available memory

2

24 / 2 = 12

2 * 12GB = 24GB

4

24 / 4 = 6

4 * 12GB = 48GB

8

24 / 8 = 3

8 * 12GB = 96GB

12

24 / 12 = 2

12 * 12GB = 144GB

Number of Containers

Number of partitions per container

Total available memory

2

24 / 2 = 12

2 * 24GB = 48GB

4

24 / 4 = 6

4 * 24GB = 96GB

8

24 / 8 = 3

8 * 24GB = 192GB

12

24 / 12 = 2

12 * 24GB = 288GB

Note

Having larger number of partitions will provide you better flexibility in terms of having more scaling “check points”. Having too many partitions (hundreds) will impact the system performance since in some point this will generate some overhead due to the internal monitoring required for each partition.

Deployment on a Single Machine (for development purposes)

For development and demonstration purposes, it is very convenient to deploy the EPU on a single machine. By default, the minimum number of machines is two (for high availability concerns). This could be changed using the singleMachineDeployment property.

Stateless / Web Elastic Processing Units

Stateless Processing Units do not include an embedded space, and therefore are not partitioned. Deployment of stateless processing unit is performed by specifying the required total number of CPU cores. This ensures 1 container per machine.

Command Line Deploy

Hot Deploy

See also:

The XAP Hot Deploy tool allows business logic running as a PU to be refreshed (rolling PU upgrade) without any system downtime and data loss. The tool uses the hot deploy approach , placing new PU code on the GSM PU deploy folder and later restart each PU instance.