CodeIgniter Forums
Performance help! Waiting on server for ~280ms - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Performance help! Waiting on server for ~280ms (/thread-32977.html)



Performance help! Waiting on server for ~280ms - El Forum - 08-11-2010

[eluser]georgeedwards[/eluser]
Hello everyone.

In the app I'm currently developing, I've been doing a lot of benchmarking and performance tweaking, but I think I've hit a dead end. It seems to be CodeIgniter related.

Using something like FireBug, I can see that my pages are always having to "wait" on the server for circa 280-300ms before they start rendering.

I've tried stripping off all autoloaded libs, helpers, no db access, etc etc, and just had a "naked" skeleton controller and still hit the same problem - shaving maybe 80ms off tops to about 200ms.

Is this delay normal? Maybe it's server related? I don't think it's PHP/Apache per se, as using raw PHP I get much better results around 10-12ms.

Any help would be gratefully received. Thank you.


Performance help! Waiting on server for ~280ms - El Forum - 08-11-2010

[eluser]mddd[/eluser]
With such a delay, it would seem to me that maybe filesystem access is just very slow on the server??
CodeIgniter doensn't do a whole lot but it does load a number of php files of course.

If you wrote a simple script that included a number of other php files, would that lead to a similar slowdown?


Performance help! Waiting on server for ~280ms - El Forum - 08-11-2010

[eluser]georgeedwards[/eluser]
Good idea. I'll write a simple script with a bunch of
Code:
require()
calls to external files to test, and post back the results.

Meanwhile if anyone has any other ideas, I'd be glad to hear them.

Thanks Smile


Performance help! Waiting on server for ~280ms - El Forum - 08-11-2010

[eluser]Crimp[/eluser]
If you have root access to your server, you can test the speed:

Code:
hdparm -tT /dev/xvda

This will tell you if reads on the server are slow.