I have been experiencing a problem over the past few days eerily similar to the one m.arthur reported recently. Out of nowhere, my backups seem to be taking a much longer time to complete than they normally do–going from a typical 18-23 minute runtime to taking anywhere from 1-2 hours to complete. Interestingly, this is only happening (to this degree) to one of my backup sets. The other is (relatively) unaffected.
Vitals
To start with, some basic information on my setup: I’m running Windows 8.1 Pro (64-bit) and Duplicati - 2.0.6.3_beta_2021-06-17.
Backup sets
Anomalous set | Well-behaved set | |
---|---|---|
Name | Backup to FTP | Backup to Azure |
Source size | 644.20 GB | 523.61 GB |
Backup size | 710.72 GB | 561.81 GB |
Versions | 221 | 96 |
Oldest version | October, 2018 | October, 2018 |
Frequency | hourly | daily |
Normal duration | 18-23 minutes | 12-20 minutes |
Duration since 9/1 | 19-120 minutes | 21-36 minutes |
Auto-compact interval | weekly | weekly |
Rate of growth (backup) | 530 MiB/week | 220 MiB/week |
Chunk (block) size | 100 kB (default) | 100 kB (default) |
Volume (dblock) size | 100 MB | 50 MB |
Database size | 7.40 GiB | 3.36 GiB |
Timeline
Looking at my duplicati-monitoring logs, this appears to have started with the 11:00 run of my “Backup to FTP” set on 9/1, which took 94 minutes to complete. Since then, the backups of this set have regularly been taking more than an hour to complete, and up to 2 hours in the worst case.
A full listing of all backups for this set, along with their durations, can be viewed below.
Observations
Time spent in different backup phases
I keep a separate, local log file for each backup set (logging at the Retry
level). For the purposes of this issue, there are two distinct periods of time for each backup run:
-
Time-to-list: the elapsed time from when the backup operation starts to the first logged backend
List
event -
List-to-end: the elapsed time from the first logged backend
List
event to the last completed backendGet
event (as part of the post-backup verification)
So, for example, in the following backup run, the time-to-list would be 11 minutes, and the list-to-end time would be 9 minutes, for a total backup duration of 20 minutes. (This is typical of backups for the “Backup to FTP” set, prior to the manifestation of the problem.)
sample nominal backup log
2021-08-30 00:00:02 -07 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started
2021-08-30 00:11:15 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2021-08-30 00:11:20 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (15.03 KB)
2021-08-30 00:16:48 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-b719b8c04fee145b494c501e06126eecd.dblock.zip.aes (14.48 MB)
2021-08-30 00:16:53 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-b719b8c04fee145b494c501e06126eecd.dblock.zip.aes (14.48 MB)
2021-08-30 00:17:08 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-i16728579942248dfb2e0faf42380e997.dindex.zip.aes (100.58 KB)
2021-08-30 00:17:08 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-i16728579942248dfb2e0faf42380e997.dindex.zip.aes (100.58 KB)
2021-08-30 00:17:13 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-20210830T070002Z.dlist.zip.aes (29.74 MB)
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-20210830T070002Z.dlist.zip.aes (29.74 MB)
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-StartCheck]: Start checking if backups can be removed
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-FramesAndIntervals]: Time frames and intervals pairs: 1.00:00:00 / Keep all, 7.00:00:00 / 01:00:00, 90.00:00:00 / 1.00:00:00, 365.00:00:00 / 7.00:00:00, Unlimited / 31.00:00:00
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupList]: Backups to consider: 2021-08-29 23:00:01, 2021-08-29 22:00:01, 2021-08-29 21:00:01, <snip>
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupsToDelete]: Backups outside of all time frames and thus getting deleted:
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-AllBackupsToDelete]: All backups to delete: 2021-08-23 00:00:02
2021-08-30 00:17:16 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteRemoteFileset]: Deleting 1 remote fileset(s) ...
2021-08-30 00:19:49 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Started: duplicati-20210823T070002Z.dlist.zip.aes (29.71 MB)
2021-08-30 00:19:49 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Completed: duplicati-20210823T070002Z.dlist.zip.aes (29.71 MB)
2021-08-30 00:19:50 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteResults]: Deleted 1 remote fileset(s)
2021-08-30 00:19:50 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2021-08-30 00:19:55 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (15.03 KB)
2021-08-30 00:19:55 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-20210830T040001Z.dlist.zip.aes (29.74 MB)
2021-08-30 00:19:59 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-20210830T040001Z.dlist.zip.aes (29.74 MB)
2021-08-30 00:19:59 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-ib2129f08e61c483ca60605041c07c229.dindex.zip.aes (108.37 KB)
2021-08-30 00:19:59 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-ib2129f08e61c483ca60605041c07c229.dindex.zip.aes (108.37 KB)
2021-08-30 00:20:00 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-bdbb197ed037e469ca6caf3cbe56b5d38.dblock.zip.aes (67.08 MB)
2021-08-30 00:20:08 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-bdbb197ed037e469ca6caf3cbe56b5d38.dblock.zip.aes (67.08 MB)
Between the start of the backup operation and the first List
command being issued against the backend (that is, the time-to-list period), Duplicati appears to be warming up and twiddling the database, as can be observed by viewing the live Profiling
log:
The interesting thing about the backups which are taking much longer is that, while there is only a modest increase in list-to-end time (e.g., to 16 minutes), the time-to-list has greatly increased (e.g., to 50+ minutes), and seems to be responsible for the lion’s share of the backup duration.
sample long-running backup log
2021-09-02 15:42:22 -07 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started
2021-09-02 16:35:55 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2021-09-02 16:35:59 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (15.15 KB)
2021-09-02 16:46:18 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-bed9c3b61772442ddab4a44cc757d53c3.dblock.zip.aes (15.31 MB)
2021-09-02 16:46:46 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-bed9c3b61772442ddab4a44cc757d53c3.dblock.zip.aes (15.31 MB)
2021-09-02 16:47:09 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-ib0ac698cc45c4fd08a512c995f540072.dindex.zip.aes (117.61 KB)
2021-09-02 16:47:10 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-ib0ac698cc45c4fd08a512c995f540072.dindex.zip.aes (117.61 KB)
2021-09-02 16:47:17 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-20210902T224222Z.dlist.zip.aes (29.75 MB)
2021-09-02 16:47:20 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-20210902T224222Z.dlist.zip.aes (29.75 MB)
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-StartCheck]: Start checking if backups can be removed
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-FramesAndIntervals]: Time frames and intervals pairs: 1.00:00:00 / Keep all, 7.00:00:00 / 01:00:00, 90.00:00:00 / 1.00:00:00, 365.00:00:00 / 7.00:00:00, Unlimited / 31.00:00:00
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupList]: Backups to consider: 2021-09-02 14:34:17, 2021-09-02 13:00:03, 2021-09-02 12:00:03, <snip>
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupsToDelete]: Backups outside of all time frames and thus getting deleted:
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-AllBackupsToDelete]: All backups to delete: 2021-08-26 16:12:49
2021-09-02 16:47:21 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteRemoteFileset]: Deleting 1 remote fileset(s) ...
2021-09-02 16:52:27 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Started: duplicati-20210826T231249Z.dlist.zip.aes (29.80 MB)
2021-09-02 16:52:27 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Completed: duplicati-20210826T231249Z.dlist.zip.aes (29.80 MB)
2021-09-02 16:52:33 -07 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteResults]: Deleted 1 remote fileset(s)
2021-09-02 16:52:33 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2021-09-02 16:52:37 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (15.15 KB)
2021-09-02 16:52:38 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-20210902T224222Z.dlist.zip.aes (29.75 MB)
2021-09-02 16:52:42 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-20210902T224222Z.dlist.zip.aes (29.75 MB)
2021-09-02 16:52:42 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-i5c6cf9206d664b6494dab38f3e1aaeee.dindex.zip.aes (125.58 KB)
2021-09-02 16:52:42 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-i5c6cf9206d664b6494dab38f3e1aaeee.dindex.zip.aes (125.58 KB)
2021-09-02 16:52:42 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-b749c6c78581e405685449c068e5237ad.dblock.zip.aes (14.83 MB)
2021-09-02 16:52:44 -07 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-b749c6c78581e405685449c068e5237ad.dblock.zip.aes (14.83 MB)
I don’t have time to do so right now, but I plan to whip up a script tomorrow to analyze the backup logs and list the time-to-list, list-to-end, and total duration for every backup, so we can get a better idea of the actual breakdown across backups.
Time-of-day variation
Looking back at the duplicati-monitoring screenshots, it’s pretty evident that backup durations are better in the mornings, before deteriorating in the afternoon. Since this problem has only manifested since Wednesday, I still don’t know whether “time of day” or “time since boot” is the true driver here. I’ll report back once I know more.
Attempts to remediate
vaccum
-ing the database
I remembered reading something on the forums a while ago talking about performance gains from vaccum
-ing a backup set’s database, so I gave it a shot. While it decreased the size of the DB by 500 MB or so, there was no observable increase in performance as a result.
Defragmenting the database drive
The Duplicati databases for both of my backup sets live on the same SSD (with nothing else except some Icaros icon DBs), so I wondered if the constant writing to the sqlite database files might have ended up severely fragmenting them (before you say anything, yes, your SSD does sometimes need to be defragmented). Windows’ defrag.exe
showed 4% fragmentation on the drive, so I had it defragment just in case. Sadly, it did not help.
Next steps
There’s still a lot of poking and prodding I want to do to see if I can’t tease out what’s causing this, but I wanted to get this post written up first, just in case anyone has seen an issue like this before, or has any specific details they want to request from me.
Mostly to remind myself, I plan to work on the following and report back my results:
- Analyze the logs to get the time-to-list, list-to-end, and total duration for every backup for the past week
- Figure out if time of day really affects backup duration
- Manually retrim the SSD the databases live on (?)
- Check for new programs installed around when the problem started
If you have any ideas or would like me to report back any other specific information, please feel free to chime in!