Bug 434788 - Running kbackup as root drops performance noticeably
Summary: Running kbackup as root drops performance noticeably
Status: RESOLVED NOT A BUG
Alias: None
Product: kbackup
Classification: Applications
Component: general (show other bugs)
Version: 19.12
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: Martin Koller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-22 19:07 UTC by dev.lh
Modified: 2021-06-21 12:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dev.lh 2021-03-22 19:07:02 UTC
SUMMARY
When kbackup is run using `sudo kbackup` or in a similar way with uid 0, it can (and will?) happen that one cpu core will be working at 100%, disabling the UI thread (after about 2 hours running the files from minute one are still visible and the shown files stop after about 10-20 minutes).
Additionally it seems as running it as root heavily slows down kbackup:
Backups seem to need 1.5 - 2 times more time when run as root (comparison: ~1h:30 for normal use vs. ~2h:45 when run as root)

STEPS TO REPRODUCE
1. Run kbackup as root, i.e. through `sudo kbackup`
2. Start a backup (at best with many files/ folders)
3. Wait a few minutes (I think after about 10-20 minutes kbackup noticeably drops in performance)
4. Enjoy a frozen programme

OBSERVED RESULT
KBackup does not respond to anything anymore.
Always one arbitrary cpu core runs at 100% for kbackup (verified i.e. through htop), changing every seconds which one.


EXPECTED RESULT
kbackup should not freeze when run in root.
It should also be about as performant as when run not as root.


SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.8.0-45-generic
OS Type: 64-bit
Memory: 15,5 GiB of RAM
Comment 1 Martin Koller 2021-03-22 20:30:47 UTC
I run kbackup always as root but did never see this behavior.
I assume it has to do with what directories you are saving, since running as
root of course allows to enter all subdirs which might not be possible when
running as a normal user.
So the question is: what files/dirs are in the tar archive when running as root which are not in the tar archive when running as a normal user ?
Comment 2 Martin Koller 2021-06-21 12:41:21 UTC
No answer. closing.