I am developing Rails application(ruby2.1.5 and rails4.2.0) for embedded
device.I have observed that every time when I run Rails Application,CPU
utilization spikes to 100% for few seconds on startup
My system info is as follows:
root@wandboard-quad:~/test3# uname -a
Linux wandboard-quad 3.0.35-4.0.0-wandboard+gd35902c #1 SMP PREEMPT
Wed Aug 6 12:42:22 IST 2014 armv7l GNU/Linux
I have followed following steps:
- Created new application with following command:
rails new test3
Started rails server
rails server
I have got following cpu utillization on startup
1569 root 20 0 10392 6960 2472 R 29 0.4 0:00.88 ruby
1579 root 20 0 25404 19m 3448 R 97 1.1 0:03.04 ruby
1579 root 20 0 44416 35m 4196 R 100 1.9 0:06.04 ruby
1579 root 20 0 61084 51m 4460 S 76 2.8 0:08.32 ruby
1579 root 20 0 62148 52m 4516 S 5 2.9 0:08.47 ruby
1579 root 20 0 62148 52m 4516 S 0 2.9 0:08.48 ruby
1579 root 20 0 62148 52m 4516 S 0 2.9 0:08.49 ruby
1579 root 20 0 62148 52m 4516 S 0 2.9 0:08.50 ruby
After digging further using BYEBUG ,I think cpu spikes in
commands_tasks.rb file in method server at following line
require APP_PATH
what might be reason for CPU going high on startup?
I have tried this various webservers like Webbrick,thin,unicorn.