In order to test my AutoScaling group, i wanted to simulate a huge CPU usage so that a new instances will be created (based on metrics that i configured in Cloudwatch : average CPU >= 60)
The EC2 instance is a simple t2.micro and i used the stress command : stress -c 1 -t 400s
I can see in top that the process has started and the CPU is used at 100% but the problem is that it's not constant. Sometimes it dopes to 10% sometimes it's up to 100%, and in cloudwatch monitoring the CPU average usage is under 20% even after 5minutes of stress !
I tried with other arguments (stress -c 2 or stress -c 4) it's the same thing. I also tried with this command : yes > /dev/null &
Cloudwatch always can't see a 100% CPU usage.
What's the problem ? Is there any protection made by Amazon to limit a huge load on the CPU ?
Thanks for your help.