CodeIgniter Forums
100% CPU usage - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: 100% CPU usage (/thread-29930.html)



100% CPU usage - El Forum - 04-26-2010

[eluser]Unknown[/eluser]
I am using code igniter on WAMP and I am using JMeter to do some performance testing. When I load only 5 users into the web application, the CPU on the windows goes to 100%. Can someone tell me what is going on and why the CPU goes up to 100%.


100% CPU usage - El Forum - 04-26-2010

[eluser]WanWizard[/eluser]
Can be anything, although often it's the database engine that uses the CPU. Which shouldn't be a problem as long as this 100% means 'available capacity well used' and not 'system overloaded'.


For comparison, my dev server is a Core i7. Originally just running LAMP, MySQL had no problem getting the CPU graphs to 100% even with light loads. Now this same machine runs Hyper-V with 7 VM's. That same LAMP environment still bursts to 100% CPU, but the performance difference is hardly measurable. Only when performing stress-tests I see that the VM can handle less concurrent connections (which for development is not an issue Wink).


100% CPU usage - El Forum - 04-26-2010

[eluser]Unknown[/eluser]
My configuration is that I have three servers: srever 1 is running the web server, srever 2 is running the mysql and server 3 is running an application server.

When I run a load test the CPU on the web server goes to 100% usage during the load test. I also run the default code igniter page with no database access.

Is there something that I can do on code igniter to prevent the 100% cpu usage.

Any help will much appreciated.


100% CPU usage - El Forum - 04-27-2010

[eluser]WanWizard[/eluser]
CodeIgniter itself is quite light-weight, if requesting the default CI welcome page causes your server to max out, you have other serious problems.
Enable the profiler, so you can see how much time CI exactly uses, and for what.