No I havent tried that, how does it work and how would I run it?
Thanks
Main Topics
Browse All TopicsHi, Im running Mandrake 9.2 and php 4.
I am also running a few game servers and I generate player stats for these servers using php. Whenever php runs on the server, it uses 99% of the cpu and causes the gameservers to lag and people often leave the server because it becomes unplayable for about a minute whilst php is running.
Is there anyway to restrict the amount of cpu usage php gets so it wont cause lag on the game servers when its running?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The "nice" value affects CPU scheduling. You can see that with the "top" tool:
top -I
Processes with a higher nice value don't get an equal CPU share on a fully loaded machine. You could also use negative nice values for your game server when using root, but I wouldn't recommend that. Example:
renice -5 <server_pid>
so nice -n 19 command would mean that the command being called would get less priority than other running commands?
Could I also start all 3 of my gameservers using the nice command? I.E
nice -n -20 /bin/gameserver1
nice -n -20 /bin/gameserver2
nice -n -20 /bin/gameserver3
and the stats using
nice -n 20 /bin/stats1
nice -n 20 /bin/stats2
nice -n 20 /bin/stats3
Business Accounts
Answer for Membership
by: stefan73Posted on 2004-11-02 at 05:46:23ID: 12472477
Hi choccarlm,
Did you try "nice"? Or renice?
Cheers!
Stefan