2

I started a new instance (c1.medium) and top show some crazy cpu usage

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                               
 9561 ubuntu    20   0 84888  63m 3472 R 5880  3.6 493:36.15 ruby                                  
 9658 ubuntu    20   0 79288  58m 3724 R 5743  3.4 856:36.66 ruby                                  
 9740 ubuntu    20   0 85256  65m 5304 R 3447  3.8 775:07.12 rake                                  
 9558 ubuntu    20   0 77244  56m 3388 R 1784  3.2   1456:15 ruby                                  
 9715 ubuntu    20   0 79292  59m 4136 R 1729  3.4 770:06.72 ruby                                  
 5752 root      20   0 25476 7732 1852 S 1143  0.4 603:09.50 PassengerHelper                       
 9728 ubuntu    20   0 77240  57m 4456 S  286  3.3 209:00.55 ruby                                  
 9719 ubuntu    20   0 90696  69m 3900 S  144  4.0 229:13.64 ruby                                  
 5939 www-data  20   0  229m 8352 2072 S  143  0.5 782:36.95 apache2                               
10765 ubuntu    20   0  2564 1200  928 R  143  0.1   0:04.31 top                                   
10662 www-data  20   0  227m 6704 1992 S  117  0.4   2:52.41 apache2                               
 9891 www-data  20   0  226m 7208 2024 S   52  0.4  68:11.19 apache2 

Any idea what is going on here?

user9517
  • 115,471
  • 20
  • 215
  • 297
  • What ami did you start? Do you expect apache2 and ruby to be running on it? `ps aux | grep ruby` will give you more detail on what ruby is running. – Decado Mar 23 '11 at 06:57

1 Answers1

2

On the AWS Developer Forums it is stated that:

"Linux instances will not report the proper values for CPU usage due to how it communicates on with the virtualization layer on the underlying host. For accurate values for CPU usage on EC2 instances, please use the CloudWatch metrics."

Link: https://forums.aws.amazon.com/thread.jspa?messageID=326790

Similar question here at SF: Munin: Graph not plotting one label

jLi
  • 136
  • 5
  • 1
    In virtual machines sharing more than one guest, CPU operation can switch between guests (host switches between VM engines). The non-running guest would effectively see the time used by the running guest as time utilized by the process it had dispatched. VM layer communications should provide information guest kernels to resolve this. But something is still not right with all this. Even on real machines I sometimes see processes at 9999% and I only have 2 to 12 CPUs/cores in my machines. – Skaperen Sep 15 '12 at 19:05