-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2009-03-16 at 07:43 +0100, Jan Ritzerfeld wrote:
Am Sonntag, 15. März 2009 schrieb Carlos E. R.:
On Sunday, 2009-03-15 at 16:03 +0100, Jan Ritzerfeld wrote:
Am Samstag, 14. März 2009 schrieb Carlos E. R.:
[...]. Another related question, is whether it would be possible to limit a process to having, say, 20% of the cpu. [...].
http://cpulimit.sourceforge.net/ http://download.opensuse.org/repositories/home:/etrash/
This looks just like it.
At least, it seems worth trying.
It does work; in some cases better, some others not so good. But fair enough. You need to start it on a terminal, like: cpulimit -e par2 -l 50 when the par2 process ends, it waits for another of the same name, and then controls it. It complains a bit if it does not run as root: ] Warning: cannot renice. I don't know how important is that. It has some funny effects: I used it by PID on a "cp" started inside "mc", and mc thought the process had backgrounded and returned the terminal. You know what would be cute? Having an interface like "top", where you could select one or several processes to limit, in just one control terminal. Going up/down with the cursor, then the +/- keys to change the limits, then seeing the resulting behavior on the same display :-)~~
A wild idea would be running the process as child of another, and the parent issuing sigstops/sigconts intermittently.
| Now cpulimit does limit also the children of the specified process. | The code is still experimental, so let me know how it is.
It seems my idea is not so wild, after all.
Right! :-D
Still, doing this in userspace I suppose is not so efficient as if the kernel could do it directly in the scheduler.
I do not know.
http://linux-vserver.org/CPU_Scheduler#Token_Bucket_Extension
Interesting... but I understand it is not something the default linux kernel does. I'll have to read more of it, another day.
Curious.
For keeping the average(!) CPU temperatue low, this should be sufficient.
I don't think any of those to can be applied to a typical or default install, it is for virtual servers :-? - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknJbggACgkQtTMYHG2NR9XHxwCfc8vTqIfUoL3AWQPH291m34m9 ClcAoIoMOe5DWiOG/SeBvv2AY6XHv8Et =ahDk -----END PGP SIGNATURE-----