linuxmint / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
2.41k stars 85 forks source link

Option to Optimize Rsync Speeds #141

Open adrianteri opened 1 year ago

adrianteri commented 1 year ago

Is your feature request related to a problem? Please describe. I have an old system that's running timeshift on a daily schedule for some selected paths/folders. I understand timeshift launches at anytime. However, the performance impact on usability and other aspects that make use of the System's bus like network connections is too dear.

5-10 minutes after the top of the hour daily is when I notice this. Opening htop I see rsync -aii ... consuming ~90-100% of Disk I/O. The system is somewhat usable but it's degraded performance that you'll notice as launching simple apps or switching between windows or activities/programs takes a lot of time.

Describe the solution you'd like I would like a toggle/checkbox to "optimize" speeds for rsync. A test(several tests?) of total bandwidth(of the system) while still on the wizard can be made and saved. ~15-20% of this speed maybe used in rsync's --bwlimit=RATE option

Describe alternatives you've considered rsync can be run in daemon mode where the bwlimit is specified in /etc/rsyncd.conf. However, I this is not a viable option for desktop users.

ionice can be used in conjunction with timeshift launching rsync where it limits the priority of the various 'spawned' rsync process IDs ...ionic -p PID.... However, this would be an additional dependency which apart from the Debian family there aren't readily available packages from the likes of archlinux, suse & rpm.

Additional context N/A

mnn commented 1 year ago

Yes, this is a serious problem for me too. ionice approach does nothing, at least in my case (luks). Not being able to specify specific times or maximal IO bandwidth leads to terrible UX. It's especially bad when gaming - load times go from 15 seconds to several minutes, even with ionice. For work it's also not optimal, but at least it's "just" 2-3 times slower. I don't have that bad rig either (3 years old hi-end gaming pc).

Timeshift is also pretty aggressive with its scheduling - it overrides everything in the cron file, even when access should be disabled (removed rw flags for root), so it's not easy to force some schedule. I might look into more advanced access control, but it might be easier to just download sources and hard-code bandwidth limit with which is rsync launched. :disappointed: