Hacker News new | ask | show | jobs
by foolinator 5185 days ago
Bahh.. it was at where I worked. It was because we relied on C libraries that PHP connected to. When PHP is slow, they make links to C libs to get speed. Java did the same with JNI. PHP simply isn't fast enough in some situations where C libs are necessary to hook up with. (private message me if you disagree.. I'll be glad to go into details)

We were typically getting up to 200 req/second on our stack. So it was pretty heavy traffic to begin with. We solved the core dumps though. And the java core dumps were for the same reason (necessary to connect to JNI).

1 comments

Sure... when dealing with custom C code and hand-rolled non-vanilla PHP, I can see that happening. Understand that your experience was in the realm of the .01% of PHP usage. 200/req second isn't all that outrageous for run of the mill PHP (depending on hardware) but when you're throwing in custom connector stuff on top of that, yeah, you'll get core dumps. :/
That's all I said though, is that it reminded me of my Java years.

And yeah, connecting to C libs is commonplace in large PHP places. In fact, that's how PHP gets a lot of it's work done to be quick. Your ".01%" is a number you're throwing out of your ass and you know it.

I'm not surveying PHP usage, merely telling my experience. If you work on a website and need to connect to an external system that only has a C lib, guess what? You're going to connect using C libs.