Re: [opensuse] Process priority control
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2009-03-15 at 05:03 -0400, Osamalamadingdong wrote: Please, remember to post to the list, not in private. ...
As kcryptd is not a child process of par2, it does not inherit its niceness value, I understand - but it is a real nuisance.
Can this situation be changed?
renice it to 19.
Yes, I can do that by hand, but my question is more general: could not the kcryptd process inherit the niceness of the calling process? And that hack requires being root. Ie, what's the use of having a user process running "very nice", if the system processes it calls run at high priority? The purpose of "nice" is defeated. Consider that a user could slow down an important machine by running a batch of nice processes when more important tasks are running normally. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkm9Db0ACgkQtTMYHG2NR9UwEACfZjMZ72udA3L5mEU9SJDShLFb Ll0An3NvzcM4EpNKis0aGk65tbSdttsg =5BEq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
renice it to 19.
Yes, I can do that by hand, but my question is more general: could not the kcryptd process inherit the niceness of the calling process?
And that hack requires being root.
Ie, what's the use of having a user process running "very nice", if the system processes it calls run at high priority? The purpose of "nice" is defeated.
Well, not entirely. When you give your process a lower priority it will be given less resources - unless there is plenty of them. If your process doesn't run, I'm sure kcrypt won't be either. Maybe try renicing your process to -19 and see what happens then.
Consider that a user could slow down an important machine by running a batch of nice processes when more important tasks are running normally.
They're all users on the same machine, so apart from priority they all have the same access to its resources. When the machine is more loaded, yes, it'll process each job slower, but that's life. Without system resource limitations (see /etc/security/limits.conf), any user can bring the system down, more or less. /Per -- Per Jessen, Zürich (9.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, 2009-03-15 at 15:42 +0100, Per Jessen wrote:
Carlos E. R. wrote:
renice it to 19.
Yes, I can do that by hand, but my question is more general: could not the kcryptd process inherit the niceness of the calling process?
And that hack requires being root.
Ie, what's the use of having a user process running "very nice", if the system processes it calls run at high priority? The purpose of "nice" is defeated.
Well, not entirely. When you give your process a lower priority it will be given less resources - unless there is plenty of them. If your process doesn't run, I'm sure kcrypt won't be either. Maybe try renicing your process to -19 and see what happens then.
Ok, I'm running a copy of 4.4G right now. The cp process uses under 10% (running nice 19), but the two kcryptd processes (source and destination) use about the rest, 60..80%. I can type this mail easily, but closing the folder and opening another takes nearly a minute. Well, that's not too fair, it is i/o bound. If I wanted to watch a movie, say, while I wait the copy process or the par2 run (about 90 minutes per DVD), the movie doesn't run smoothly, because it doesn't have enough cpu available. I'd have to run xine at a higher priority, as user, than the kcryptd process.
Consider that a user could slow down an important machine by running a batch of nice processes when more important tasks are running normally.
They're all users on the same machine, so apart from priority they all have the same access to its resources. When the machine is more loaded, yes, it'll process each job slower, but that's life. Without system resource limitations (see /etc/security/limits.conf), any user can bring the system down, more or less.
Yes, I know. But I mean that a process that is supposed to run nice, with whatever cpu is left from the other foreground processes, has in fact a "child" process that is running "not nice", ie, at a higher priority than everybody else, and slowing the rest of processes - contrary to the intention of the user. My point is that if you run a process nice, all its children run also nice. The exception is when that process call system processes, like kcryptd, which use their own priority instead of that of the process that is calling them. I suppose this is intentional and has its own rationale, but I don't know about that, and whether I have some control (automatic, not manual). - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkm+q44ACgkQtTMYHG2NR9XXGQCeKoS/MX5mAP0LUF0AbTkAXrYc 0SoAn0DLa1o1Q0UgpvZKh5TvR3zVM0GR =qj/4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Mar 16, 2009 at 3:41 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sunday, 2009-03-15 at 15:42 +0100, Per Jessen wrote:
Carlos E. R. wrote:
renice it to 19.
Yes, I can do that by hand, but my question is more general: could not the kcryptd process inherit the niceness of the calling process?
And that hack requires being root.
Ie, what's the use of having a user process running "very nice", if the system processes it calls run at high priority? The purpose of "nice" is defeated.
Well, not entirely. When you give your process a lower priority it will be given less resources - unless there is plenty of them. If your process doesn't run, I'm sure kcrypt won't be either. Maybe try renicing your process to -19 and see what happens then.
Ok, I'm running a copy of 4.4G right now. The cp process uses under 10% (running nice 19), but the two kcryptd processes (source and destination) use about the rest, 60..80%. I can type this mail easily, but closing the folder and opening another takes nearly a minute. Well, that's not too fair, it is i/o bound. If I wanted to watch a movie, say, while I wait the copy process or the par2 run (about 90 minutes per DVD), the movie doesn't run smoothly, because it doesn't have enough cpu available. I'd have to run xine at a higher priority, as user, than the kcryptd process.
You could experiment with ionice. I have never used it, but in theory you can tell it to make running apps only do i/o if the machine is idle. HTH Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2009-03-16 at 15:52 -0400, Greg Freemyer wrote:
You could experiment with ionice.
I have never used it, but in theory you can tell it to make running apps only do i/o if the machine is idle.
I know, I've tried it. But in this particular case, both kcryptd and par2 are cpu bound. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkm+vLUACgkQtTMYHG2NR9UYmQCfT1P7pmyohGtAksmY45IzGbLJ 6ZEAnRof6nW0vhVKDGhO6+y/P8VIMY3R =Hz2+ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Carlos E. R.
-
Carlos E. R.
-
Greg Freemyer
-
Per Jessen