//.singleMachineDeployment() // uncomment when working with a
single machine agent
// set the initial memory and CPU capacity
.scale(new ManualCapacityScaleConfigurer()
.memoryCapacity(128,MemoryUnit.GIGABYTES)
.numberOfCpuCores(8)
.create())
);
7. Step 3 - Scale the PU by increasing the memory and CPU
capacity Manual Mode
pu.scale(
new ManualCapacityScaleConfigurer()
.memoryCapacity(256,MemoryUnit.GIGABYTES)
.numberOfCpuCores(16)
.create()
);i
8. Deployment Server Deploy New Stateful EPU: - 64 GB Max
Capacity - 32 GB Initial capacity - Highly Available - 4GB JVM heap
size Grid Service Manager Data Center Server Server Agent Agent JVM
JVM Server Server Agent Agent JVM JVM JVM JVM JVM JVM B B B B P P P
P P P B B P P B B
9. Scale Out Manual Mode Server Grid Service Manager Data
Center Server Server Agent Agent JVM JVM Server Server Agent Agent
JVM JVM Server Agent JVM JVM JVM JVM JVM JVM Scale Stateful EPU: -
Increase memory Capacity to 40GB Capacity B B B P P P P P P B B P B
B P B
10. Scale Out Eager Mode Server Grid Service Manager Data
Center Server Server Agent Agent JVM JVM Server Server Agent Agent
JVM JVM Server Agent JVM JVM JVM JVM JVM Monitoring Available
Memory/Cores Resource Capacity JVM B B B P P P P P P B B P B B P
B
11. Step 4 - undeploy
ProcessingUnit pu =
admin.getProcessingUnits().waitFor("myPU",10,TimeUnit.SECONDS);
if (pu != null) {
pu.undeploy();
}
12. Automatic Rebalancing
Enforce equal amount of primary and backup instances across all
the available machines.
Start new containers as needed based on the pre-defined
SLA.
13. Automatic Machine Provisioning
The EPU supports automatic Virtual Machines provisioning
through custom plugins.
The plugins are open source http://
svn.openspaces.org/cvi/trunk and provide an implementation of
ElasticMachineProvisioningConfig and
ElasticMachineProvisioning
ProcessingUnit pu = gsm.deploy( new
ElasticStatefulProcessingUnitDeployment(new File("myPU.jar"))
.memoryCapacityPerContainer(16,MemoryUnit.GIGABYTES)
.maxMemoryCapacity(512,MemoryUnit.GIGABYTES)
.maxNumberOfCpuCores(32) //automatically start new virtual machines
on demand .machineProvisioning(new
XenServerMachineProvisioning("xenserver.properties")) );