Re: slow performance
| From: | Henning Eiben | Date: | Thu, 26 Apr 2007 06:46:56 +0000 |
| Subject: | Re: slow performance | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253822@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
> On Wed, April 25, 2007 5:48 am, Henning Eiben wrote:
>> But as far as I understand, java kinda does the same thing, doesn't
>> it?
>
> Sort of, but not really...
>
> Java has a single central one giant process architecture.
>
> PHP has a shared-nothing architecture.
>
> They're at polar opposites on this bit.
>
> A PHP accelerator/cache wedges the Java-ness of caching the oft-used
> code in RAM, without the baggage of having everything in one giant
> process.
OK, but when I run PHP as an ISAPI filter, I see in my process-explorer
(systinternals) only one process (w3wp.exe), that has a lot of threads.
This must be the concurrent request being served.
Comparing this to Java, I also have only one process (java.exe) and a
huge amount of threads.
I would assume, that creating java-threads within a JVM is more
lightweight than creating new threads at the OS-level like PHP needs to do.
>> Do you know any resource, describing how php works (like the thing
>> about
>> compiling opcode, and stuff)? How does php handle simultaneous
>> requests?
>
> Woof.
>
> There are TONS of resources out there, most of which are probably
> irrelevant to your actual problem, if you'd just profile the code and
> find out what's actually going on.
Well, I want to describe my observations I made with PHP and Java, and I
want to explain why PHP is so much slower, compared to Java. So I would
like to add some references to my paper ... and to be honest, I'm afraid
I would run out of time if I would profile PHP to figure exactly out
what's going on.
So I don't need the source-code of PHP to show what's *exactly* going
on, but roughly describing how PHP works.
>> Are there multiple threads spawned?
>
> And in Windows, maybe, where the whole concept of process/thread is of
> a different nature than Linux threads/processes.
hmm, too bad I'm stuck with windows :)
> PHP run under Apache lets Apache handle the process/thread splitting.
Well, same with windows ... I would assume that the IIS is handling the
whole process/thread stuff
> Again, though, profile your code, please.
hmm ... as mentioned above - but I might give it a try
--
... The UART's won't take this speed, Captain