Per Process Threshold

Started by shantanu_gadgil, December 15, 2008, 01:12:24 AM

Previous topic - Next topic

shantanu_gadgil

Hi,
As I understand the ProBalance, it kicks in when the entire CPU usage crosses a certain limit.

Is there any way (besides setting priorities and such) in which a "per process threshold" limit can be set?

Just to elaborate:
IF a process jumps above X% CPU, choke it, optionally for Y minutes/seconds

Am I missing some obvious way of setting the above option? (I am using v3.32 released Dec 13)

Regards,
Shantanu

Jeremy Collake

Yes, you can do that with the existing version. There are actually two metrics that determine when it kicks in. When BOTH are true, restraint occurs. I know this is less than clear in the ProBalance config dialog, I need to work on that.

Anyway, here is how it goes: When total CPU usage exceeds X percent, lower each process consuming at least Y percent of CPU cycles.

To do what you want, you simply need to lower the 'total system-wide CPU usage when restraint should begin' [X] to some really low value, like 1%. Then, you can set the 'Per-process CPU usage when restraint should begin' [Y] value to whatever you want. Doing this should cause Process Lasso to behave as you describe. You can adjust the duration of the restraint there too, of course.

If, for some reason, you find it doesn't operate like you expect it to, please let me know. I can always add additional options.
Software Engineer. Bitsum LLC.

Jeremy Collake

I'm sorry, it occurred to me you may be asking about actually limiting the amount of CPU cycles a process is allowed to consume. Perhaps I read too fast sometimes ;o.

Doing that is not possible with the current version, and probably won't ever be possible. Although it could theoretically be implemented, there are a wide array of concerns about doing that. It is typically better to just lower the priority, so that the threads of other processes always take precedence.
Software Engineer. Bitsum LLC.

shantanu_gadgil

QuoteTo do what you want, you simply need to lower the 'total system-wide CPU usage when restraint should begin' [X] to some really low value, like 1%. Then, you can set the 'Per-process CPU usage when restraint should begin' [Y] value to whatever you want. Doing this should cause Process Lasso to behave as you describe. You can adjust the duration of the restraint there too, of course.

Right ... this does the job, but only partially, I think.
These settings are still system-wide settings, right? They will kick-in when ANY process starts "misbehaving" :) :)

Can individual processes be set threshold limits, e.g.:
limit firefox to 20% CPU
limit mencoder to 60% CPU
limit mplayerc to 10% CPU
etc., etc.

(Not that I really plan to run all of them at the same time!!!)

Regards,
Shantanu

Jeremy Collake

No, I don't currently support individual process limits. I could add such a capability, and I will consider doing so in a future build. I'll put it on the feature request list.
Software Engineer. Bitsum LLC.