CodeIgniter Forums

Full Version: Performance help! Waiting on server for ~280ms
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[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?

El Forum

[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

El Forum

[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.