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/rubyWhat'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+  COMMAND31888 git       20   0  342m 111m 7144 R 98.9 19.0   3:57.57 rubyWhy is it killing my processor in startup?
Why is Ruby using 100% CPU in startup?
ruby
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.