[Borgbackup] backup time more than doubled going from 1.1.13 to 1.4.0

Thomas Waldmann tw at waldmann-edv.de
Sun Nov 17 08:21:02 EST 2024


On 2024-11-17 02:22, Thorsten von Eicken via Borgbackup wrote:
> One change I noticed is that with the upgrade I changed the mountpoint of the
> filesystems to be backed up, e.g. I used to back up /mnt/soumak and I change
> that to /mnt/borg/soumak. I assume that throws the file cache for a spin, but
> that should be "ironed out" after the first borg create, right?

Yes, the 2nd+ backup should be fast, even if you killed the files caches 
due to absolute path changing.

sshfs is relatively slow and you did a relatively big version jump with 
borg, that IIRC includes the change from working based on file NAMES 
(paths) to working based on file HANDLES (mainly to avoid issues with 
race conditions and improve consistency for people not using filesystem 
snapshots).

To do that, borg opens the file - it does not necessarily read from the 
open file (e.g. if the files cache says the file is not modified), but 
it always uses the handle for file ops, so we can be sure all refers to 
the same fs object, even if renames or deletes happen in the fs.

It could be that open() is slow on sshfs. IIRC we have seen slow open() 
on NFS.

If that is the cause, you'll have to live with it or not use a fs with 
slow open(). For local fs, open() is quite fast.

 >> FILES: 3111998 total, 6531 added, 1491 modified, 0 chunked

That looks like the files cache IS working, so guess it must be the open().

>> What I'm observing is that borg sits most of time using 100% cpu, so I don't
>> think the increased time comes from disk, network, or filesystem, but I could
>> be
>> wrong... I'm wondering whether I did something wrong and it's MD5-ing data to
>> detect changes or something like that.

I don't think it is reading/hashing the files for the 2nd+ run. If it 
were (due to files cache misses), it would say all files were added.

>> - the box running borg is a quad-core arm with a 8TB drive (was 4TB before
>> upgrade)
>> - the borg 'binary' comes from borg.bauerj.eu

Do you see any "msgpack is slow" warnings?

>> - filesystem was ext4 now is btrfs

Guess it might make some difference, but guess this is not the primary 
cause of the slower speed. Esp. if most files are unchanged, it does not 
write that much to the repo.


----

GPG Fingerprint: 6D5B EF9A DD20 7580 5747  B70F 9F88 FB52 FAF7 B393



More information about the Borgbackup mailing list