Page 1 of 1

PHP on Dual Processor Server

Posted: Fri Apr 16, 2004 5:12 am
by calmac
:?: I am supporting an HP Netserver LP 1000r dual processor 866mhz and 512mb ram server. This server is one of our intranet servers which is running PHP 4.3.

I have been performance testing this app between the above server and an HP Vectra vl420 dt with 1.8ghz and 512 mb ram. Both computers are running Windows 2000 and IIS5. When running any PHP based reports involving the vectra I've noticed that the cpu utilisation will run at 100% until the report is complete. Running the same report on the Netserver only uses 50% cpu utilisation.

I am looking for clarification as to why PHP only utilises 50% of each CPU on the Netserver, I thought it would utilise 100% of both CPU's.

Is there a limit to the amount of cpu utilisation that a process can utilise on a dual processor server? If so is there a way that I can allocate more cpu to an application? If I could allocate more cpu utilisation to a specific process, I would expect a better performance. I have tried to set the affinity through Task Manager, but get an error saying that "The operation could not be completed. Access denied".

Would appreciate your thoughts on this issue.

Posted: Fri Apr 16, 2004 5:27 am
by JayBird
Well, i don't know much about dual processors, but what you have just said seem quite right to me.

You use 100% when using a single processor. But when 2 processors are involved, the load is shared, therefor, 50% on each!?

or am i missing something?

Maybe you mean, why doesn't the process execute twice as fast by using 100% on each, for which the answer i do not know.

Mark

Posted: Fri Apr 16, 2004 6:07 am
by calmac
Yep, I thought if it was hitting 100% utilisation on a single CPU server. Then it would also utilise 100% of both cpu's in a dual processor server.

Am I missing somthing fundumental with dual processor architecture?

Posted: Fri Apr 16, 2004 6:32 am
by magicrobotmonkey
As I think I remember there's a couple of ways dual processors can work. Either
a) Duplicate - running the same thing on each on
or
b)sending different commands to each one.
I guess this isn't particularly useful since its all I can remember from some class I had once. It seems we talked about it more in depth, but the details are gone... I shouldn't have been drinking som much.

Re: PHP on Dual Processor Server

Posted: Fri Apr 16, 2004 7:54 am
by BDKR
calmac wrote: I am looking for clarification as to why PHP only utilises 50% of each CPU on the Netserver, I thought it would utilise 100% of both CPU's.
If I'm not mistaken, a single process will not be split apart by the OS to be scheduled amongst multiple processors. In other words, a single process (much like PHP) will only run on one processor.

OTOH, if the process spun threads or forked child processes, then the OS would be free to schedule (as in assign to a particular processor) as it see's fit.

Do you have any tools that tells you specifically which processor is running what process?

Anyway, this is "If my memory serves me correctly" kinda stuff. I would check some of the hardware sites and ask questions at their forums.

Cheers,
BDKR

Posted: Sat Apr 17, 2004 10:52 am
by Pyrite
Setting the afinity is what you want to do I believe, but for the webserver. Having 50% usage on each CPU is normal. I think php doesn't run in its own process but rather IIS does, and IIS will fork children on its own. I would be really surprised if IIS did not support SMP.