After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667214 - changing priority (nice) value of a process changes only first thread
changing priority (nice) value of a process changes only first thread
Status: RESOLVED OBSOLETE
Product: system-monitor
Classification: Core
Component: process list
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-03 21:12 UTC by Robert Roth
Modified: 2018-05-22 12:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Roth 2012-01-03 21:12:33 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.
Comment 1 André Klapper 2012-02-26 10:46:55 UTC
[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.]
Comment 2 Robert Roth 2012-12-31 07:56:17 UTC
Confirming, as system monitor uses the renice(1) command, which only renices the main thread.
Comment 3 Robert Roth 2013-08-03 20:18:15 UTC
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
Comment 4 Коренберг Марк 2014-06-25 19:54:28 UTC
Yes, this is good solution. Just what I want.
Comment 5 GNOME Infrastructure Team 2018-05-22 12:09:06 UTC
-- 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.