glassfish
  1. glassfish
  2. GLASSFISH-17581

scale down issue in ConferencePlanner Native

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: elasticity
    • Labels:
      None
    • Environment:

      glassfish on mac 10.5.8
      firefox 6 on windows 7

      Description

      glassfish-4.0-b08.zip
      Since scale down works on one app, but not on another, I
      record issue to see if it can be resolved with alert setting.

        Activity

        Hide
        sherryshen added a comment - - edited

        Scale-Down works in SimpleSessionDemo Native.

        For SimpleSessionDemo, the scale up/down works on Native
        with build 08 + 3 jar files from demo instruction
        http://glassfish.java.net/javaone2011/elasticitydemo.html
        i.e.elastic-engine.jar elastic-api.jar and elastic-config.jar

        1) setup and deploy app and see 3 instances
        $ asadmin start-domain
        $ asadmin enable paas-console
        $ asadmin create-ims-config-native
        $ asadmin create-template --indexes ServiceType=LB,VirtualizationType=Native LBNative
        $ asadmin deploy --availabilityenabled=true SimpleSessionDemo.war
        --see 3 cluster instances.

        2) scale up from 3 to 4 instances.
        $ asadmin create-alert --service SimpleSessionDemo --expression 'countTrue [avg(jvm_memory.heap.used)*100/jvm_memory.maxMemory > 50] /cluster_instance_size.currentSize * 100> 66' alert1
        $ asadmin add-alert-action --service SimpleSessionDemo --actionref scale-up-action --state alarm-state alert1
        $ asadmin increase-memory cloud-1
        $ asadmin increase-memory cloud-2
        --see 4 cluster instances. scaled up.

        3)scale down from 4 to 3 instance
        $ asadmin create-alert --service SimpleSessionDemo --expression 'countTrue[avg(jvm_memory.heap.used)*100/jvm_memory.maxMemory < 20] /cluster_instance_size.currentSize * 100 > 66' alert2
        $ asadmin add-alert-action --service SimpleSessionDemo --actionref scale-down-action --state alarm-state alert2
        $ asadmin decrease-memory cloud-2
        --see 3 cluster instances. scaled down.
        http://java.net/jira/secure/attachment/47933/ScaleDownNative-b08-SimpleSessionDemo.jpg

        Show
        sherryshen added a comment - - edited Scale-Down works in SimpleSessionDemo Native. For SimpleSessionDemo, the scale up/down works on Native with build 08 + 3 jar files from demo instruction http://glassfish.java.net/javaone2011/elasticitydemo.html i.e.elastic-engine.jar elastic-api.jar and elastic-config.jar 1) setup and deploy app and see 3 instances $ asadmin start-domain $ asadmin enable paas-console $ asadmin create-ims-config-native $ asadmin create-template --indexes ServiceType=LB,VirtualizationType=Native LBNative $ asadmin deploy --availabilityenabled=true SimpleSessionDemo.war --see 3 cluster instances. 2) scale up from 3 to 4 instances. $ asadmin create-alert --service SimpleSessionDemo --expression 'countTrue [avg(jvm_memory.heap.used)*100/jvm_memory.maxMemory > 50] /cluster_instance_size.currentSize * 100> 66' alert1 $ asadmin add-alert-action --service SimpleSessionDemo --actionref scale-up-action --state alarm-state alert1 $ asadmin increase-memory cloud-1 $ asadmin increase-memory cloud-2 --see 4 cluster instances. scaled up. 3)scale down from 4 to 3 instance $ asadmin create-alert --service SimpleSessionDemo --expression 'countTrue [avg(jvm_memory.heap.used)*100/jvm_memory.maxMemory < 20] /cluster_instance_size.currentSize * 100 > 66' alert2 $ asadmin add-alert-action --service SimpleSessionDemo --actionref scale-down-action --state alarm-state alert2 $ asadmin decrease-memory cloud-2 --see 3 cluster instances. scaled down. http://java.net/jira/secure/attachment/47933/ScaleDownNative-b08-SimpleSessionDemo.jpg
        Hide
        sherryshen added a comment - - edited

        Scale-down doesn't work in ConferencePlanner Native.

        For ConferencePlanner, the scale up works, and scale down doesn't work on build 08.
        1) setup, deploy app and then setup alerts.
        $ asadmin deploy --availabilityenabled=true ConferencePlanner.war
        $ asadmin create-memory-alert --servicename ConferencePlanner --threshold 50 alert1
        $ asadmin create-alert --service ConferencePlanner --expression "countTrue[avg(jvm_memory.heap.used)/jvm_memory.maxMemory*100>20]<1" alert2
        $ asadmin add-alert-action --service ConferencePlanner --actionref scale-down-action --state alarm-state alert2
        --see 2 cluster instances.

        2) From app gui, click the "Load Increase" button, and
        --see 2 to 4 instances from paas console. scaled up.
        http://java.net/jira/secure/attachment/47928/windows7_firefox6_native_b08.jpg

        3) From app gui, click the "Load Decrease" button, and
        --see 4 instances at paas console for 1 hour. Not scaled down. ??
        http://java.net/jira/secure/attachment/47934/ScaleDownNative-b08-ConferencePlanner.jpg
        jvm memory is lower than that in 2).

        Show
        sherryshen added a comment - - edited Scale-down doesn't work in ConferencePlanner Native. For ConferencePlanner, the scale up works, and scale down doesn't work on build 08. 1) setup, deploy app and then setup alerts. $ asadmin deploy --availabilityenabled=true ConferencePlanner.war $ asadmin create-memory-alert --servicename ConferencePlanner --threshold 50 alert1 $ asadmin create-alert --service ConferencePlanner --expression "countTrue [avg(jvm_memory.heap.used)/jvm_memory.maxMemory*100>20] <1" alert2 $ asadmin add-alert-action --service ConferencePlanner --actionref scale-down-action --state alarm-state alert2 --see 2 cluster instances. 2) From app gui, click the "Load Increase" button, and --see 2 to 4 instances from paas console. scaled up. http://java.net/jira/secure/attachment/47928/windows7_firefox6_native_b08.jpg 3) From app gui, click the "Load Decrease" button, and --see 4 instances at paas console for 1 hour. Not scaled down. ?? http://java.net/jira/secure/attachment/47934/ScaleDownNative-b08-ConferencePlanner.jpg jvm memory is lower than that in 2).
        Hide
        carlavmott added a comment -

        Did the instances show that they were using enough less memory after the load Decrease button was pushed? Try setting to 30 percent instead of 20. It may be that the numbers are just off by a bit.

        Show
        carlavmott added a comment - Did the instances show that they were using enough less memory after the load Decrease button was pushed? Try setting to 30 percent instead of 20. It may be that the numbers are just off by a bit.
        Hide
        sherryshen added a comment -

        Used 30 percent instead of 20 as Carla suggested.
        Increased to 3 instances instead of 4 so that total memory
        usage is less.
        Then, scale down works on ConferencePlanner in native mode and b08.
        http://java.net/jira/secure/attachment/47948/ScaleDownNative-b08-ConferencePlanner-2-3-2.jpg
        Thank Carla for guiding me to test scale up and down.

        Show
        sherryshen added a comment - Used 30 percent instead of 20 as Carla suggested. Increased to 3 instances instead of 4 so that total memory usage is less. Then, scale down works on ConferencePlanner in native mode and b08. http://java.net/jira/secure/attachment/47948/ScaleDownNative-b08-ConferencePlanner-2-3-2.jpg Thank Carla for guiding me to test scale up and down.

          People

          • Assignee:
            carlavmott
            Reporter:
            sherryshen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: