the elastic pu

14
The Elastic PU Feb 2011

Upload: shayhassidim

Post on 18-Dec-2014

6.517 views

Category:

Technology


3 download

DESCRIPTION

The Elastic PU

TRANSCRIPT

  • 1. The Elastic PU Feb 2011
  • 2. The Elastic PU
    • SLA based deployed (memory/cores).
    • Support Data-Grid and Custom PU.
    • Automatic container lifecycle management.
    • Automatic rebalancing (repartitioning).
    • Automatic partition count calculation.
    • Scale up/down or in/out without system downtime.
    • Eager and manual scale strategies.
    • Automatic Machine Provisioning plug-in.
  • 3. Entire Container Lifecycle Management
    • When using the EPU, GigaSpaces manage the entire life cycle of the container.
    • Once the EPU is deployed containers are started and the EPU instances are provisioned into these containers.
    • When the EPU scales up, additional containers are started and instances are relocated into these containers.
    • When the EPU is un-deployed, all the containers associated with the EPU are automatically terminated.
  • 4. EPU Deployment Flow
    • Start agents
    • Deploy PU
      • Specify maximum PU capacity
      • Specify container memory capacity
      • Specify initial PU capacity
    • Scale up/down or in/out
    • Undeploy
  • 5. Step 1 - Start a GigaSpaces agent on each machine
    • gs-agent.bat gsa.global.esm 1 gsa.gsc 0 gsa.global.gsm 2 gsa.global.lus 2"
    You should have one GigaSpaces agent running the ESM. No GSCs should be started manually!
  • 6. Step 2 - Run the deployment code
    • Admin admin = new AdminFactory().addGroup("myGroup").create();
    • admin.getGridServiceAgents().waitForAtLeastOne();
    • admin.getElasticServiceManagers().waitForAtLeastOne();
    • GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne();
    • // Deploy the Elastic Processing Unit. Set the maximum memory and CPU capacity and initial capacity
    • File puArchive = new File("/opt/gigaspaces/myPU.jar");
    • ProcessingUnit pu = gsm.deploy(
    • new ElasticStatefulProcessingUnitDeployment( puArchive )
    • .memoryCapacityPerContainer(16,MemoryUnit.GIGABYTES)
    • .maxMemoryCapacity(512,MemoryUnit.GIGABYTES)
    • .maxNumberOfCpuCores(32)
    • //.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")) );
  • 14.
    • End!