Re: slow performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux