The setup is

  • EC2 Micro instance
  • Nginx with FPM
  • PHP 5.2.17 with CGI
  • App connects to MySQL on RDS
  • Collectd for monitoring

JMeter is used on other servers on same EC2 region (so latency is not an issue). The problem is from the graph generated by Collectd, results are VERY spikey.

For example, 200k requests took 20 minutes, and the pattern is like 1k requests for 1 minute, then pretty much flat (not even 100) requests for 2 minutes, repeat.

The only resource that reached the limit here is CPU at 100%. The rest are still not fully-utilized.

Heck, I've tried on static page before and get pretty much the same pattern:

HUGE spike - flat - flat - HUGE spike

What am I overlooking here? Some stuff I've taken care of:

  • rlimit set to very high
  • nginx worker connection set to 8192
  • PHP-FPM max children set to 140

Below is said graph from one of the runs (200,000 requests total)

200k requests



Micro EC2 instances are designed to:

Provide a small amount of consistent CPU resources and allow you to burst CPU capacity when additional cycles are available. They are well suited for lower throughput applications and web sites that consume significant compute cycles periodically


Your load is cpu heavy so the instance is using burst capacity, the downside of it is that you get a cpu downburst after that. Your metrics match those done by Huan Liu:


You should choose (by metering) a better alternative for high cpu usage from the EC2 instance type list taking into account other aspects of your application such as I/O and memory usage.


micro ec2 instances have a burst capacity. So if the CPU is at 100% all the time, then the micro instance would get extra cpu power for a few seconds.

Thats is what is probably causing the spikes. A sudden increase in CPU power for a few seconds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.