UrbackupClient memory usage


I have urbackup 2.4 setup with several clients. It works well. That’s a very nice app.
I face a difficulty on one of my client.
During backup, memory call is going so high that it pushes data to swap.
Let see below my munin graph

The blue line above is committed.
Is there any solution to decrease that memory consuption ?

Hello @francoisPE,

I solved this by editing /usr/lib/systemd/system/urbackupclientbackend.service

ExecStart=/usr/local/sbin/urbackupclientbackend --config /etc/default/urbackupclient --no-consoletime

After this run

systemctl daemon-reload
systemctl restart urbackupclientbackend.service

Change the settings according to your needs.



I set it up !
That’s very nice.
I gonna propose a PR

I propose that code for an automatic change

TOTAL_PHYSICAL_MEM=$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)
TOTAL_SWAP=$(awk '/^SwapTotal:/ {print $2}' /proc/meminfo)
cp $file $file"_bak"
gawk -v memkb=$TOTAL_PHYSICAL_MEM -v swapkb=$TOTAL_SWAP '{ if ($0 ~ /User=root/){printf("User=root\nMemoryAccounting=true\nMemoryHigh=%.0fG\nMemoryMax=%.0fG\nMemorySwapMax=%.0fM\n",memkb*40/100/(1024*1024),memkb*60/100/(1024*1024),swapkb*15/100/1024)} else {print $0}}' < $file"_bak" > $file
rm -f $file"_bak*"
systemctl daemon-reload
service urbackupclientbackend restart

It shouldn’t use that much memory. If it does it would be helpful if you:

  1. Either compile from sources or install debug symbols
  2. Install heaptrack and run with heaptrack /usr/local/sbin/urbackupclientbackend --config /etc/default/urbackupclient --no-consoletime
  3. Send me the heaptrack result (that tells where in the program how much memory was allocated)

I try to understand from where issue is coming.
I see that a combination : docker + urbackupclient leads to a swap intensive usage.
Whatever I do including above proposal, it changed nothing
You can see on above picture one of my VPS before and after upgrade. You see that after upgrade even with high free memory, I have swap increasing each time there is a backup with urbackup

You can see on that other VPS.
I upgrade first and next implement docker.
You see that swap is increasing urbackup is running

So that, there is someting in between urbackup and docker when running together.