I need a way to set a hard limit on processor usage on the server. A user had spawned three processes, one on each processor (the fourth one got fried a long time ago), which kept them 90% busy. The result was that the server became to slow to even reply to ping packets, not to mention loss of DNS service.
The command "ulimit" has an option "-t" that can set a limit on processor usage in seconds ... what does that mean?
I want to say something like "only x% on only y processors" if possible. Is there a way to do that?
Will simply limiting processor usage help solve the problem we faced?
I think 'nice' should be sufficient. IMHO Limiting processor usage (to %x on processor y) doesn't make sense because when there is heavy load on the server, any reasonable value of x will be larger than that the kernel will assign anyway, and during light load you'll be wasting CPU time.
If you "nice" the processes enough the scheduler will make sure that higher priority processes (like DNS etc.) will get all the time they need.
On Thu, 2002-07-18 at 12:43, Vinay Pai wrote:
I think 'nice' should be sufficient. IMHO Limiting processor usage (to %x on processor y) doesn't make sense because when there is heavy load on the server, any reasonable value of x will be larger than that the kernel will assign anyway, and during light load you'll be wasting CPU time.
You are right. Arbit limits on processor usage isn't the right way to do it.
If you "nice" the processes enough the scheduler will make sure that higher priority processes (like DNS etc.) will get all the time they need.
But nice works with only individual processes. I am trying to setup a system-wide limit. I think giving a hefty priority boost to server-related users in /etc/security/limits.conf should do the trick.
Sameer.