LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CPU Usage handling, possible? (https://www.linuxquestions.org/questions/linux-newbie-8/cpu-usage-handling-possible-140274/)

dude4you 01-30-2004 03:16 AM

CPU Usage handling, possible?
 
We got a PHP homepage right now.
One application we got is also in php and we use:
linux#> php /var/www/html/web/calculating.php
to do a calculation with queries in the MySQL Database.

The problem now is that, as soon as we start the calculation the CPU Usage goes up to 100% for about 10 Minutes and the Webrequests of Users is very slow.
Is there a way to tell calculating.php to just less CPU?

PS: Please don't give me the answer I should write calculating.php in Perl.
I know it is not a nice way, but the application has been used and is to big/complicated to migrate.

frob23 01-30-2004 03:18 AM

use nice... try `nice 15 php ...etc...`

dude4you 01-30-2004 03:35 AM

Thanks, I am testing right now, lets see how it works out.

If someone still knows a command on PHP to change the
CPU schedule like wait() or similar, please tell me.

dude4you 01-30-2004 04:02 AM

just found the command PROC_NICE() on php.net


All times are GMT -5. The time now is 06:38 PM.