Hi Martin, If you set the threshold of load average in the autoscaling policy to like 20-40 range and use the below script[1] to stress a particular VM/Vms, then the CPU usage will get higher. In that case, it will eventually exceed the threshold and then stratos will try to scaleup.
If you are using memory consumption, then you can try to increase the memory usage using any of your scenarios and make the stratos to scaleup. However, if you set the threshold as very lower values, then even at the beginning stratos will scaleup as the stats will hit the threshold. [1] https://github.com/lahirus/SetupStratos/blob/master/stress/stress_yes.sh Thanks, Reka On Fri, May 22, 2015 at 10:01 PM, Martin Eppel (meppel) <mep...@cisco.com> wrote: > Hi Reka, > > > > Thanks for the explanation. I think my question was more directed towards > how can I simulate the statistics to exceed the thresholds to trigger the > scale up, especially in the context of test automation. > > > > So to rephrase it, how can I simulate cartridge statistics events without > having to modify the cartridge code ? > > > > Thanks > > > > Martin > > > > *From:* Reka Thirunavukkarasu [mailto:r...@wso2.com] > *Sent:* Thursday, May 21, 2015 9:59 PM > *To:* dev > *Subject:* Re: Testing stratos 4.1: group scaling > > > > Hi Martin, > > Let me explain how group scaling works in a high level manner. Say, it a > group(G1) has two independent clusters(no dependent scaling) C1 and C2. > > G1 - min 1 max5 > > C1 - min 1 max2 (applies per cluster instance) > > C2 - min 2 max 3 (applies per cluster instance) > > Where C1 and C2 are children of G1. At the beginning, we will create one > group instance say G11 and corresponding cluster instance for C1 and C2 of > G11 will get created. Then each C1 and C2's cluster instance will receive > stats per cluster instance wise. If the stats is greater than the > threshold, then as C1 and C2's cluster instance have room to scaleup by one > more instance according min and max configuration, each clusters will get > scaleup until it hits the max. Once max is reached, if the stats is still > high, then when C1 or C2 doesn't have space to scaleup, it will notify the > parent (G1). So, G1 will check whether it has group scaling capability. If > so, it will try to create new group instance. If no group scaling enable, > it will notify its parent. If the eventual parent application, then > application will try to get busted if there is space. > > If you mention your configuration as below, then when the stats is higher, > group scaling will immediately happen as C1 and C2 don't have space to > scaleup: > > G1 - min 1 max5 > C1 - min 1 max1 > C2 - min 2 max 2 > > Hope above points will help you to test the group scaling. > > > > Thanks, > > Reka > > > > > > On Fri, May 22, 2015 at 5:20 AM, Martin Eppel (meppel) <mep...@cisco.com> > wrote: > > Hi, > > > > I am setting up a test application to test group scaling (following the > example from the 4.1 Wiki - > https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Group+Scaling+Application+on+OpenStack). > > > > > I was wondering if you have any suggestion how to actually force / > simulate the conditions to force a group to scale up ? How does it work in > the sample application (to get the group to scale up) ? > > > > Btw I am using open stack as IaaS, not the Mock IaaS. > > > > Thanks > > > > Martin > > > > > > > -- > > Reka Thirunavukkarasu > Senior Software Engineer, > WSO2, Inc.:http://wso2.com, > > Mobile: +94776442007 > > > -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007