proxmox-backup-client killed /memory allocation of 27536946 bytes failed

Aug 7, 2017
44
3
48
54
Hi, we currently test proxmox-backup-client and experience that the backup of all VM with a memory <= 2GB fail due to a memory issue. Fiddled around with --entries-max 524288 and --chunk-size 2048 with no success. I have read that the size of chunk is crucial for performance, so we would not like to reduce it anyway.

Is > 2G memory needed for proxmox-backup-client backup?

We are on Rocky 8.

Thank you!
 
What's the error you get? What's your version?
Code:
proxmox-backup-client version
Anyways, it should work with less than 2 GB
 
Last edited:
Code:
proxmox-backup-client version
client version: 2.1.2
Client for Rocky 8 is from https://github.com/sg4r/proxmox-backup-client

Code:
Starting backup: vm/NAME/2022-03-04T12:12:34Z
Client name: NAME
Starting backup protocol: Fri Mar  4 13:12:34 2022
Using default encryption key..
Encryption key fingerprint: 57:99:b6:66:94:29:42:b1
Using default master key..
No previous manifest available.
Upload directory '/' to 'backup@pbs@IP-ADDRESS:8007:vm-backup' as NAME.pxar.didx
skipping mount point: "boot"
skipping mount point: "dev"
skipping mount point: "mnt/share"
skipping mount point: "proc"
skipping mount point: "run"
skipping mount point: "srv"
skipping mount point: "sys"
skipping mount point: "var/lib/nfs/rpc_pipefs"
bin/pbs-backup.sh: line 12: 155735 Killed                  PBS_PASSWORD_FILE="NAME" /usr/local/sbin/proxmox-backup-client backup NAME.pxar:/ --backup-id NAME --repository backup@pbs@IP-ADDRESS:vm-backup --backup-type vm

This is really strange, it is using almost all CPU and needs all RAM.
 
dmesg -T:

Code:
[Fri Mar  4 13:24:04 2022] [ 155799]     0 155799   648872   468354  4890624        0             0 proxmox-backup-
[Fri Mar  4 13:24:04 2022] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1173401116.slice/session-2916.scope,task=proxmox-backup-,pid=155799,uid=0
[Fri Mar  4 13:24:04 2022] Out of memory: Killed process 155799 (proxmox-backup-) total-vm:2595488kB, anon-rss:1873416kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:4776kB oom_score_adj:0
[Fri Mar  4 13:24:04 2022] oom_reaper: reaped process 155799 (proxmox-backup-), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
 
great that you found a workaround, but what probably would also fix it (without excluding the lastlog) would be this commit: https://git.proxmox.com/?p=proxmox-...ff;h=d91a0f9fc90aecabc4f359d968f716a14562ce78
which tuned the allocator parameter a bit so that the general memory usage does not get so high.. though this is only in 2.1.5 and your client is 2.1.2

Is there a way for PBS to handle this situation with sparse-files?
pbs already handles sparse files (by backing up zeroes and restoring sparse) but i think the allocator did not play well with our memory usage pattern...

try upgrading the client to 2.1.5, and see if it is better
 
Do you have an idea when official client for EL8 is coming?
no AFAIK there is no timeline on that ...

you could try to contact the original maintainer of that script and ask if he can update it.
alternatively you could tune the allocator by using an environment variable:

Code:
MALLOC_MMAP_THRESHOLD_=131072 proxmox-backup-client ...

this is basically the same as we set internally in the newer versions.
 
Thanks. I already contacted the maintainer. It seems he is not active currently.

I understand that there is a need for a timeline. What I do not understand, is that a client for EL8 is not a top priority. We have only Rocky8 in production. We use Debian only for our Proxmox Server... From our perspective, the missing client for EL is against the requirements of the market ...
 

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!