Click to See Complete Forum and Search --> : Setting servers with higher priority
usprohosting
01-26-2005, 01:25 AM
Hello,
Here is what I am trying to do. Any help is great.
I have 6 counter strike servers running.
I would like to know how to assign each server to a different cpu,
also after you set it to a different cpu how to set those to servers with higher priority.
Also how do you check what there current priority is?
Thanks Frank
bwkaz
01-26-2005, 08:26 PM
Higher priority than what? ;)
Priority only controls which process gets to run next when the kernel makes a scheduling decision. It runs through each of the priority levels, and if any task (process or thread) is in the "runnable" state and has that priority, then that task gets to run next. So unless you have the servers contending for the CPU with other processes, setting the priority isn't going to buy you anything.
Have you looked at the CPU utilization on the machine? Because if the servers aren't using more than about 5% of the CPU each, then setting their priority higher is rather pointless. As is moving them to different CPUs -- if they (comparatively) never need the CPU, then giving each of them their own CPU won't make any difference in how fast they run. They'll still be waiting for network traffic (or whatever they do most of the time).
On top of that, I'm not sure there is a way to set CPU affinity for a process, though I could be wrong on that. If there isn't, it's because the kernel scheduler doesn't want to be told how to do its job: if a CPU is under-utilized, the scheduler will move active tasks over to that CPU on its own. And if no CPUs are being under-utilized, then there's nothing you can do to speed stuff up anyway.
Maybe it would help to know the basic problem that you're trying to solve here?
On second thought, do you actually have the bandwidth to support 6 separate servers, with however many users on each of them? (10 kilobytes/sec/user) Or won't the servers be published outside your LAN? If they will be Internet servers, and you don't have enough bandwidth, and you're trying to boost responsiveness, then the bandwidth is the bottleneck, and you won't see any difference if you tweak scheduling parameters and whatnot anyway.
usprohosting
01-27-2005, 01:06 AM
First of all thanks for the response,
Bandwidth is not the issue...I can run 120 players before bandwidth becomes a problem.
I just want to have the servers to be higher priority then anything else that is running on the machine. Also I was working on trying to find what the balance is on the machine with all 6 servers running on the box.
Just trying to making gaming on my server very smooth and have no problems.
Thanks for the help.
Frank
ph34r
01-27-2005, 09:51 AM
Check the man page for nice. I don't think you can assign cpu affinity, but with nice you can control how much priority a particular process gets.
Sepero
01-27-2005, 11:39 AM
Originally posted by ph34r
Check the man page for nice.Also, renice.
usprohosting
01-27-2005, 01:24 PM
Is there a way to check what nice they are set at before I change it?
Thanks
Frank
bwkaz
01-27-2005, 07:57 PM
You could renice the process ID to zero. renice prints the previous priority, and zero is the "default".
But again -- setting all the servers to a higher priority isn't going to do a single thing unless your CPU usage is already being maxed out...