View previous topic :: View next topic |
Author |
Message |
mobrien -
Joined: 05 Oct 2004 Posts: 18
|
Posted: Mon Feb 12, 2007 4:17 pm Post subject: Multiprocessor + Abyss + PHP = poor performance |
|
|
Hi,
I am running abyss on a Windows machine with a p4 HT processor. I noticed that scripts seem to run faster on my pIII linux machine, but I can't use it.
Upon further inspection, I noticed that multiple PHP threads were opening when a complex page is loaded. This is good. However, all of the php functions are run on the same virtual processor. I'm sure that performance would be much better if they used both processors. It would be even better if PHP would use both processors at the thread level (use both for each process).
Does anyone know if there is a way to force it to alternate threads between processors? Is this a function of PHP or Abyss Web Server?
Thanks for your help,
--mobrien _________________ ---------------------------------------------------------
http://mobrien118.sytes.net |
|
Back to top |
|
|
Tom Chapman -
Joined: 09 Jul 2005 Posts: 933 Location: Australia
|
Posted: Mon Feb 12, 2007 10:08 pm Post subject: |
|
|
ht gives you a virtual processor? |
|
Back to top |
|
|
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Mon Feb 12, 2007 10:21 pm Post subject: |
|
|
The OS is responsible for controlling where the process are run, and how long there time slot is, etc. I don't think Abyss or PHP has the power to alter this. A Pentium 4 processor is a signal core chip only, and as a result cannot run more than one thread at a time. To decrees script execution time, try reducing the number of other applications / processes running on the computer. _________________ Olly |
|
Back to top |
|
|
mobrien -
Joined: 05 Oct 2004 Posts: 18
|
Posted: Mon Feb 12, 2007 10:22 pm Post subject: |
|
|
Tom Chapman wrote: | ht gives you a virtual processor? |
Well, HyperThreading technically is 2 virtual processors. The processor looks like 2, but there is really only 1 CPU. That is how it achieves performance gains, by using two instruction queues and organizing computations to maximize processor efficiency without actually adding another CPU (like todays dual core processors do). Check out wikipedia or intel's website for more information on the topic.
The problem MAY be with my system, but php-cgi.exe will only use 50% max of my total processor utilization (viewable through task manager).
--mobrien _________________ ---------------------------------------------------------
http://mobrien118.sytes.net |
|
Back to top |
|
|
Tom Chapman -
Joined: 09 Jul 2005 Posts: 933 Location: Australia
|
Posted: Tue Feb 13, 2007 7:05 am Post subject: |
|
|
hyper-threading why not call it dt (dual-threading)? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Feb 13, 2007 11:17 am Post subject: Re: Multiprocessor + Abyss + PHP = poor performance |
|
|
mobrien,
It's the operating system that handles process/thread scheduling and no user application has the power to interfere with its decisions.
For your information PHP does not use multithreading. It's basically one process using one thread (even if you can see two or three threads, only one is relevant for the PHP code execution).
So when you use FastCGI, and have two or more PHP processes handling concurrent PHP requests, chances are that the OS will run each PHP process on a different (virtual) processor.
By the way, you should also check the other processes that are running on your computer at the same time: poor performance on modern hardware is often a sign of a resource sucker (such as an antivirus) running on your computer. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
mobrien -
Joined: 05 Oct 2004 Posts: 18
|
Posted: Tue Feb 13, 2007 6:02 pm Post subject: Re: Multiprocessor + Abyss + PHP = poor performance |
|
|
aprelium wrote: | mobrien,
It's the operating system that handles process/thread scheduling and no user application has the power to interfere with its decisions.
For your information PHP does not use multithreading. It's basically one process using one thread (even if you can see two or three threads, only one is relevant for the PHP code execution).
So when you use FastCGI, and have two or more PHP processes handling concurrent PHP requests, chances are that the OS will run each PHP process on a different (virtual) processor.
By the way, you should also check the other processes that are running on your computer at the same time: poor performance on modern hardware is often a sign of a resource sucker (such as an antivirus) running on your computer. |
I use ProcessExplorer to view process information, and when I load a complex page with many php includes, it opens many processes. For instance, I have Gallery2 on my web server. When I load the main page it starts 4 php processes with abyss as the parent process. The thing is that the php processes will max out at 50% processor usage, and they ALL run on the same HT virtual processor. I was just hoping that there was some way to make them use both. Maybe it is an OS problem, but it's not a resource hog problem (to any significant degree).
I think I am going to invest in a multicore machine pretty soon anyway. I am using Server 2003, if that makes any difference.
Thanks for the info!
--mobrien _________________ ---------------------------------------------------------
http://mobrien118.sytes.net |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Wed Feb 14, 2007 1:49 pm Post subject: |
|
|
Because of the 50% usage issue you may find it better to disable HT in the BIOS of your motherboard. This may increase performance, but then it could also decrease performance of other programs. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
Immemiaplaype -
Joined: 13 Jul 2011 Posts: 13 Location: United Kingdom
|
Posted: Mon Dec 19, 2011 12:57 pm Post subject: Multiprocessor Abyss PHP poor performance |
|
|
The Devs could use the information
A good way to get your system specs is to to go the start menu, hit run, and type dxdiag in the box.
The only thing I request before you post your specs is to
PLEASE UPDATE YOUR DRIVERS This will help your performance. |
|
Back to top |
|
|
|