long php startup times

  • Posted May 29, 2013

Wondering if anyone else is seeing this. I’m normally used to FreeBSD not Ubuntu (13.04) so I’m not even sure if this is normal

Even when running a static .html file with php it normally takes 20 ms to do-

root@lb01:xxx# time php ok.html OK real 0m0.022s user 0m0.008s sys 0m0.012s root@lb01:xxx# time php ok.html OK real 0m0.020s user 0m0.012s sys 0m0.004s

Using real PHP files are even worse. This is on a 512 MB droplet.

On my FreeBSD machine (dedicated) it works as expected-

root@lb1:xxx # time php ok.html OK0.023u 0.005s 0:00.02 100.0% 8470+7210k 0+0io 0pf+0w root@lb1:xxx # time php ok.html OK0.028u 0.007s 0:00.03 66.6% 8470+7210k 0+0io 0pf+0w

The BSD box has a lot more extensions loaded than the Ubuntu one but it does have the same ones Ubuntu does have loaded. That is- pdo, apc, gd, memcache, mysql, mysqli, pdo_mysql, xdebug, mongo. When I remove all extensions it doesn’t make a huge difference.

As well I don’t believe it’s related to the disk. I tested it and it was OK. My FreeBSD box uses normal HDDs. Is this just a difference that should be normal?

P.S. PHP versions: Ubuntu 5.4.6-1ubuntu1.2 FreeBSD: 5.4.10 (built from ports Apr 22)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

So what was it? Other people might want to know…

Ah I see my issue now, I’m just being an idiot and misreading :D