[Bug 756493] New: Yast2 System Backup causes Xorg to use much CPU
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c0 Summary: Yast2 System Backup causes Xorg to use much CPU Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Enhancement Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: holmberg2066@comcast.net QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.229 Version/11.61 Running the GTK GUI for System Backup, I notice that of the CPU being used on my system, half is by the y2base process and half is by Xorg. I assume this is due to the high rate that the Backup GUI is updating the number of packages found (the number changes so fast I can't read the right-most digits). You could cut in half the CPU load on the system that is due to running System Backup by simply updating the GUI much less often. Note: Perhaps the rate at which System Backup finds packages on my system is unusually high since the system is installed on a vary fast solid-state drive. Reproducible: Always Steps to Reproduce: 1. Run top or htop, observe the CPU load on the system, especially the Xorg process, which should be at nearly zero CPU usage. 2. Start the System Backup GUI. 3. Click the "Create Backup" button. 4. Observe the "Modified Files" and "Total Size" fields update their values very fast (too fast to read). 5. Back in top, observe the Xorg process using nearly as much CPU as the "y2base backup gtk" process. 6. When the backup finishes, observe the CPU usage of Xorg return to nearly zero. So, whatever was causing Xorg to use so much CPU, was clearly related to the System Backup GUI. Actual Results: CPU usage on my dual-core system is nearly 100%. Expected Results: I expected CPU usage to only be about 50% (one core, not two). At least until the "Create package archives" phase starts (running bzip). Suggested change: update the "Modified Files" and "Total Size" values in the GUI much less often. System is installed on a solid-state drive, so Yast discovers packages at a very high rate during backup. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c1 kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |kkzhang@novell.com InfoProvider| |holmberg2066@comcast.net --- Comment #1 from kk zhang <kkzhang@novell.com> 2012-04-11 06:37:37 UTC --- Hi,thank you for your report.could you please help to provide y2logs according to the following URL?Thank you. http://en.opensuse.org/openSUSE:Bugreport_YaST -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c2 Greg Holmberg <holmberg2066@comcast.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|holmberg2066@comcast.net | --- Comment #2 from Greg Holmberg <holmberg2066@comcast.net> 2012-04-11 17:59:39 UTC --- Created an attachment (id=485688) --> (http://bugzilla.novell.com/attachment.cgi?id=485688) Y2Logs from the System Backup tool OK, here are the logs. I'm not sure how log files help you implement an enhancement, but OK. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c kk zhang <kkzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |yast2-maintainers@suse.de |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|yast2-maintainers@suse.de |locilka@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c3 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Lukas Ocilka <locilka@suse.com> 2012-04-13 13:18:00 UTC --- YaST logs were obviously not needed, the bug is well-reported and clear. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Severity|Enhancement |Normal -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c4 --- Comment #4 from Lukas Ocilka <locilka@suse.com> 2012-04-16 10:56:27 UTC --- Created an attachment (id=486230) --> (http://bugzilla.novell.com/attachment.cgi?id=486230) Proposed patch How to apply the patch: cd /usr/share/YaST2/include/backup/ patch -p0 < /path/to/yast-backup.diff -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c5 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |holmberg2066@comcast.net --- Comment #5 from Lukas Ocilka <locilka@suse.com> 2012-04-16 10:59:55 UTC --- Please, retest with patch from comment #4. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c6 Greg Holmberg <holmberg2066@comcast.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|holmberg2066@comcast.net | --- Comment #6 from Greg Holmberg <holmberg2066@comcast.net> 2012-04-16 18:25:00 UTC --- Hi Lukas-- I applied the patch and tested. However, I still saw very fast updates to the numbers on the screen, and I got the same CPU usage from Xorg. Looking at the code, I think I see why. In this line if (ui_time_now > ui_last_refresh) { the condition is always true. I think ui_time_now needs to be at least a certain amount of time > 0 after ui_last_refresh. For example: if (ui_time_now > ui_last_refresh + 10) { However, I tested this and again, there was no effect. In addition to 10, I also tried 100 and 1000. To verify that I was modifying the right file, I renamed the ui.ycp file, and restarted. Sure enough, the GUI couldn't start, so I'm definitely editing the right file. I can't explain why none of this has an effect on Xorg's CPU usage. It seems like it should. Greg -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c7 --- Comment #7 from Lukas Ocilka <locilka@suse.com> 2012-04-17 10:20:39 UTC ---
From my POV, "if (ui_time_now > ui_last_refresh) {" is correct because time() returns integer with seconds from 1.1.1970, see http://doc.opensuse.org/projects/YaST/SLES11/tdg/time.html
Considering that, ui_time_now should stay the same for one second and thus updating the UI sometimes skipped. There must be something else, I'll try to debug that issue a bit more. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c8 --- Comment #8 from Lukas Ocilka <locilka@suse.com> 2012-04-17 11:28:57 UTC --- Created an attachment (id=486423) --> (http://bugzilla.novell.com/attachment.cgi?id=486423) Another (additional) patch ui_last_refresh was always set to 0 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c9 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |holmberg2066@comcast.net --- Comment #9 from Lukas Ocilka <locilka@suse.com> 2012-04-17 11:29:22 UTC --- Retest, please. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c10 Greg Holmberg <holmberg2066@comcast.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|holmberg2066@comcast.net | --- Comment #10 from Greg Holmberg <holmberg2066@comcast.net> 2012-04-17 23:09:33 UTC --- Ahh. time() returns seconds. OK, that works. I had assumed milliseconds. I tested the latest patch, and it works. CPU utilization by Xorg was 12% to 18% of one core (normally running 0% to 2%). Which is a great improvement over 100% of one core. One last improvement you could make would be to do the same thing with the "Searching in Package" widget. It's still updating many times per second, and I would guess this is the cause of that last 12% to 18% CPU utilization by Xorg. Actually, looking at the code, it appears to me that you've already tried to do that. Perhaps it has the same bug (i.e. dir_last_refresh is always zero)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c11 --- Comment #11 from Lukas Ocilka <locilka@suse.com> 2012-05-03 13:59:01 UTC --- Created an attachment (id=489391) --> (http://bugzilla.novell.com/attachment.cgi?id=489391) Last patch for "Searching in Package: ..." -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c12 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |holmberg2066@comcast.net --- Comment #12 from Lukas Ocilka <locilka@suse.com> 2012-05-03 13:59:48 UTC --- Please retest with the latest additional patch for "Searching in Package: ..." dialog. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c13 Greg Holmberg <holmberg2066@comcast.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|holmberg2066@comcast.net | --- Comment #13 from Greg Holmberg <holmberg2066@comcast.net> 2012-05-05 00:44:32 UTC --- Well, that had the right effect on CPU usage. Xorg used only 0% to 1% CPU while system backup was searching for modified files. Unfortunately, it only rarely updated the "Searching in Package" widget. Approximately 5 to 7 seconds between updates. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c14 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #14 from Lukas Ocilka <locilka@suse.com> 2012-05-16 13:16:33 UTC --- I've checked that on my system and UI is refreshed every single second (if applicable), the rest is skipped. You can find an updated package in openSUSE:Factory repository, the version is yast2-backup-2.22.2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| |maint:running:49405:low -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=756493 https://bugzilla.novell.com/show_bug.cgi?id=756493#c15 Swamp Workflow Management <swamp@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard|maint:running:49405:low |maint:running:49405:low | |maint:released:sle11-sp2:49 | |406 --- Comment #15 from Swamp Workflow Management <swamp@suse.de> 2012-10-13 00:02:34 UTC --- Update released for: yast2-backup Products: SLE-DESKTOP 11-SP2 (i386, x86_64) SLE-SERVER 11-SP2 (i386, ia64, ppc64, s390x, x86_64) SLES4VMWARE 11-SP2 (i386, x86_64) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com