[TUTORIAL] PBS on Harddisks only and large amount of Backups timeout in PVE.

itNGO

Well-Known Member
Jun 12, 2020
762
175
53
45
Germany
it-ngo.com
Hi there,
just a quick tip. We are using disk-based PBS-Servers where SSDs are not used.
If you are using mostly rotating hard disks with PBS and you get timeouts when listing Backups in PVE you can change Directory/File-Cache-Setting to keep the file and directory Metadata in RAM.

This is done just by adjusting "vm.vfs_cache_pressure" in sysconf or during runtime "sysctl vm.vfs_cache_pressure=10". You need to have enough ram to keep your directory/file inodes in RAM. (Example here about 5000 backups and 32GB RAM in Server with XFS is enough)

This setting will also boost Garbage Collection runtime a lot.

With "find /mnt/datastore/ -ls > /dev/null" in Shell/Terminal you can "preload" the structure or just wait until the Server has loaded it in Cache/RAM when selecting Backupstore in PVE....

This does not mean you should not use SSDs in your PBS, but not everyone has that value to spend. Often Backupservers are created from "old" Systems which are replaced by newer ones.... ;-)
 
Last edited:
Sorry, but does "during runtime" mean that I set it with a script before every backup, or as a general setting on the PBS server?

I have lots of timeouts, and need to reboot every now and then. Quite annoying tbh.
This is for speeding up Garbage Collection and Backup Listing, not the Backup-Job itself.
It is a Config-File-Setting which you only do once, but the preloading has to be done after a reboot to get the cache filed up fast. Can also be a CRON-Job...
 
Ok, so someting like this would work?

if grep 'vm.vfs_cache_pressure' /etc/sysctl.conf then echo "VFS Cache already set, skipping..." else sysctl -w vm.vfs_cache_pressure=50 { echo "###################################################################" echo "# Tune PBS Garbage Collection" echo "vm.vfs_cache_pressure=50" } >> /etc/sysctl.conf fi
 
Last edited:
Ok, so someting like this would work?

if grep 'vm.vfs_cache_pressure' /etc/sysctl.conf then echo "VFS Cache already set, skipping..." else sysctl -w vm.vfs_cache_pressure=50 { echo "###################################################################" echo "# Tune PBS Garbage Collection" echo "vm.vfs_cache_pressure=50" } >> /etc/sysctl.conf fi
More or less yes, but set "sysctl vm.vfs_cache_pressure=10" to have a good chance that cache will not be cleared from other services....
 

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!