GNOME Bugzilla – Bug 667214
changing priority (nice) value of a process changes only first thread
Last modified: 2018-05-22 12:09:06 UTC
Forwarded from https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/539594. I have started 7z archive creation. It spawned two threads eating both CPUs. After changing priority using gnome system monitor, only first thread (tid=pid) is changed. second thread continues using default (zero) nice value.
[Adding missing "QA Contact" entry so system monitor bug report changes can still be watched via the "Users to watch" list on https://bugzilla.gnome.org/userprefs.cgi?tab=email when the assignee is changed to an individual.]
Confirming, as system monitor uses the renice(1) command, which only renices the main thread.
After some more digging around, it seems that renice does only change the nice of the main thread on purpose. [1] A suggestion to alter this behavior to change the nice of all threads of the given process has been rejected on the Linux Kernel Mailing list [2], to avoid breaking applications which are basing upon the current behavior . So the solution here should be to renice both the process with the given pid, and all it's threads found in /proc/PID/tasks in the gsm-renice tool application. [1] http://jlebar.com/2013/4/11/Beware_of_renice.html [2] https://lkml.org/lkml/2008/9/10/122
Yes, this is good solution. Just what I want.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-system-monitor/issues/34.