0

I installed GitLab on an EC2 instance a while ago, compiling Ruby from scratch:

$ ruby -v 
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$ which ruby
/usr/local/bin/ruby

What's really strange is that whenever I start anything with this Ruby interpreter, such as a GitLab backup job, restarting the GitLab worker, etc. my CPU usage spikes to near 100% usage for a long period of time even before I see any output from Ruby. It seems that it's working so hard just to load the libraries required by GitLab.

How can I debug this and find out what in the world is taking so long? I don't think that it's swapping either, as memory usage for the ruby process isn't so high:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU $MEM    TIME+  COMMAND
31888 git       20   0  342m 111m 7144 R 98.9 19.0   3:57.57 ruby

Why is it killing my processor in startup?

Naftuli Kay
  • 39,676

1 Answers1

0

I ended up recompiling Ruby. It's now much more responsive, usually, but what @wingedsubmariner said was accurate:

Amazon severely constrains the CPU time [micro] instances can use.

Naftuli Kay
  • 39,676