LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2004, 04:16 AM   #1
dude4you
LQ Newbie
 
Registered: Jan 2004
Posts: 16

Rep: Reputation: 0
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.
 
Old 01-30-2004, 04:18 AM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Ubuntu, FreeBSD
Posts: 1,449

Rep: Reputation: 48
use nice... try `nice 15 php ...etc...`
 
Old 01-30-2004, 04:35 AM   #3
dude4you
LQ Newbie
 
Registered: Jan 2004
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 01-30-2004, 05:02 AM   #4
dude4you
LQ Newbie
 
Registered: Jan 2004
Posts: 16

Original Poster
Rep: Reputation: 0
just found the command PROC_NICE() on php.net
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get CPU Usage ramicub Programming 3 11-02-2010 05:34 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 06:55 AM
CPU Usage Jehos Programming 3 11-30-2003 06:46 AM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration