LXC backup slow vzdump to NFS storage

foobar73

Member
Jan 19, 2016
17
1
23
51
pve-manager/7.1-11/8d529482 (running kernel: 5.13.19-6-pve)

LXC housed on ZFS

very small (8GB) LXC taking 1/2 an hour to backup to an NFS mount regardless of compression settings. It is a 10Gb/s wire to the NFS server.

It seems to be related to the tar command somehow, because a KVM backup is very fast.

To prove my theory, I ran vzdump with the stdout flag to tar -tv and it seems very, very slow.

Any ideas?
 
You could edit the /etc/vzdump.conf and change the "tmpdir" to a local SSD or even RAM disk. That way it will tar it locally and then send the archive to the NAS. By default vzdump would use your NFS share to store the temporary data.
 
Last edited:
I forgot to say that I have two other identical hardware-wise nodes without this problem. The difference is those are running pve 6.3.

I tried the tmpdir option and nothing changed.
 
I found the culprit but do not understand why it works, primarycache and secondarycache were both set to metadata. Setting them to all fixed it.
 
I found the culprit but do not understand why it works, primarycache and secondarycache were both set to metadata. Setting them to all fixed it.

Exactly the same here. Backup of a 670mb container took almost one hour. After changing primarycache and secondarycache to all it takes a couple of seconds (11 to be precise).

For anyone having the same:
Bash:
$ zfs get primarycache
$ zfs set primarycache=all local-zfs
$ zfs set secondarycache=all local-zfs

Change local-zfs to your specific storagepool
 
Last edited:
  • Like
Reactions: albert_a

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!