|
Bugzilla – Full Text Bug Listing |
| Summary: | Yast2 System Backup causes Xorg to use much CPU | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Greg Holmberg <holmberg2066> |
| Component: | YaST2 | Assignee: | Lukas Ocilka <locilka> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | ||
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | openSUSE 12.1 | ||
| Whiteboard: | maint:running:49405:low maint:released:sle11-sp2:49406 | ||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
Y2Logs from the System Backup tool
Proposed patch Another (additional) patch Last patch for "Searching in Package: ..." |
||
|
Description
Greg Holmberg
2012-04-10 20:41:54 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 Created attachment 485688 [details]
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.
YaST logs were obviously not needed, the bug is well-reported and clear. Created attachment 486230 [details]
Proposed patch
How to apply the patch:
cd /usr/share/YaST2/include/backup/
patch -p0 < /path/to/yast-backup.diff
Please, retest with patch from comment #4. 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
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.
Created attachment 486423 [details]
Another (additional) patch
ui_last_refresh was always set to 0
Retest, please. 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)? Created attachment 489391 [details]
Last patch for "Searching in Package: ..."
Please retest with the latest additional patch for "Searching in Package: ..." dialog. 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. 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 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) |