GNOME Bugzilla – Bug 649398
[gnome-system-monitor]3.0.0-1 takes ~10 sec to quit
Last modified: 2013-08-01 03:02:12 UTC
Created attachment 187221 [details] strace output System monitor hangs for 8-10 sec after closing window then a Force Quit window flashes for a moment and system monitor finally quits.
Gnome 3.0.1 gnome-system-monitor 3.0.0-1 kernel26 2.6.38.5-1 nvidia 270.41.06-1
While my machine doesn't take nearly as long as your to close g-s-m, there is definitely a noticeable lag. I'll look into it. Thanks for the bug report.
I have noticed that g-s-m scrapes the hard drive a lot while this happens. What is it trying to write to?
Hey there Chris, I'm still seeing this in 3.2. Looking at the strace above it does look like it's trying to read a ton of files when exiting, why is that?
Not sure yet. I've not had much time to look at system-monitor lately. I'll try to get to it ASAP. If anyone submits a patch that fixes this I'd quickly review it.
This seems to be caused by the g_settings usage of the procman_save_tree_state method, when it does save the column settings. Maybe that info should also be saved right when changing (as it happens with the spinbuttons) so it will not be required to iterate through each column and save all information for them.
Created attachment 200808 [details] [review] Proposed patch Attached a patch moving the column preferences g_settings saving out of the update called on the end. The proposed patch saves the column width after resize for the column resized (have to do this only for one column, the updated one, no iteration needed) and saves the column visibility settings when changed from the preferences (only for the toggled column, no iteration needed here either). This reduces the quit time a bit, and there is no huge HDD activity peak anymore (there still is a smaller one, as some g_settings keys still have to be saved on quit).
This problem has been fixed with commit bc2a8c221604fe335b690ba7d180022bf0430fff in the development version. The fix will be available in the next major software release. Thank you for your bug report.
*** Bug 672951 has been marked as a duplicate of this bug. ***
*** Bug 673503 has been marked as a duplicate of this bug. ***
I now have Gnome 3.4, and I still get a little lag, like 1.5 seconds to close.
+1. I'm not really satisfied with this fix. My hdd shouldn't be involved in checking cpu load or closing a process.
(In reply to comment #12) > +1. I'm not really satisfied with this fix. My hdd shouldn't be involved in > checking cpu load or closing a process. Actually it's very much involved in saving settings on close. Could someone please provide an strace as the first post did.
I'd be interested in looking at an strace from David or Alex.
Here it is, I just open gnome-system-monitor and right after send a close signal by my Window Manager. I tried to attach the text file, but it's too big. https://raw.github.com/gist/84884a98f8c79da60b07/d6f02b907ee2c5d009f646566847de462e78cc92/gnome_system_monitor_trace.txt
Created attachment 250529 [details] [review] Use a tuple to store window state It's faster to set a single gsettings tuple than four integers. Also, remove g_settings_sync() as it's automatic
Created attachment 250530 [details] [review] Save sort column and order when they change Instead of doing that at shutdown and delaying exit
Attachment 250529 [details] pushed as d347dd1 - Use a tuple to store window state Attachment 250530 [details] pushed as 5b836af - Save sort column and order when they change
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.