Is there a way to set the priority (renice) a specific Virtual Machine on my server?

I am running three VMs on VMWare Server 2.0 on a Debian Lenny box with two physical CPUs. Obviously each of these three VMs are running as the same program, but have seperate process IDs. I was wondering if there was maybe a script I could use to give one box (my VOIP Asterisk PBX) priority over the other two.



Since each virtual machine runs as a seperate process, I don't think you need anything more than the standard renice command. Assuming the two VMs you want to run at lower priority have the process id's of 1542 and 1543, you could use

renice -n 10 -p 1542
renice -n 10 -p 1543

to add 10 to their niceness. Your Asterisk VM should have the default niceness of 0, so this would give them a lower priority than it. The least priority you can assign to a process is a niceness level of 19.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.