On 14/07/2022 04.16, Paulo da Silva wrote:
> Hi!
>
> I have a USB external backup volume with btrfs.
> The backup script is a simple cp -al <prev> <next> followed by a rsync
> to update <next>.
I prefer to use snapshots and then send/receive, this tend to take a lot
shorter time than cp or rsync as you will only send the changes and
nothing more.
> The cp -al took 10-20 mins. in kernel 5.13 and before that.
> Now, with 5.15, without any changes, it is taking a few hours!!
I don't remember which kernel 5 version had a change in local cache,
which could in some cases cause things to work differently.
Have you tested with other file system on a similar usb device? This to
figure out if it's related to btrfs or usb.
There are speed optimization in 5.16 regarding btrfs, so an upgrade
could be good.
> Now, I can always navigate inside the drive without any delay when cp
> -al is in course! It seems like there is no memory cache although the
> memory cache still grows and shrinks.
>
> BTW, my mount command is
> mount /dev/mapper/TEMP /mnt1 -onoatime,compress-force=zstd > There is an encryption layer below the fs.
Could be this that causing the problem and not btrfs itself.
I would recommend you check up changes in the crypto layer too.
Also it could be a combination of crypto + btrfs, but should in such
case been resolved in later kernel versions.
--
//Aho