Storage Settings

The Storage Settings category optimizes storage configuration and performance in Proxmox VE. These optimizations are essential for efficient storage operations in virtualized environments where multiple VMs and containers share storage resources.

Available Optimizations

1
Increase vzdump Backup Speed

This optimization configures vzdump to enhance backup speed by adjusting bandwidth limits and I/O priority.

Why it's beneficial:Faster backups reduce the impact on system performance during backup operations and allow for more frequent backups, improving data protection. This is particularly important in environments with large amounts of data or tight backup windows.

This adjustment automates the following commands:


# Configure bandwidth limit
sed -i '/^#*bwlimit:/d' /etc/vzdump.conf
echo "bwlimit: 0" >> /etc/vzdump.conf

# Configure I/O priority
sed -i '/^#*ionice:/d' /etc/vzdump.conf
echo "ionice: 5" >> /etc/vzdump.conf
      

2
Install and Configure ZFS Auto-snapshot

This optimization installs the zfs-auto-snapshot package and configures automatic ZFS snapshots at various intervals.

Why it's beneficial:Automatic ZFS snapshots provide a robust and efficient method for point-in-time recovery, protecting against data loss or corruption. This is especially useful in virtualized environments where quick recovery options are crucial.

This adjustment automates the following commands:


# Install zfs-auto-snapshot
apt-get -y install zfs-auto-snapshot

# Configure snapshot schedules
sed -i 's|^*/[0-9]*.*--keep=[0-9]*|*/15 * * * * root /usr/sbin/zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4|' /etc/cron.d/zfs-auto-snapshot
sed -i 's|--keep=[0-9]*|--keep=1|g' /etc/cron.hourly/zfs-auto-snapshot
sed -i 's|--keep=[0-9]*|--keep=1|g' /etc/cron.daily/zfs-auto-snapshot
sed -i 's|--keep=[0-9]*|--keep=1|g' /etc/cron.weekly/zfs-auto-snapshot
sed -i 's|--keep=[0-9]*|--keep=1|g' /etc/cron.monthly/zfs-auto-snapshot
      

3
Optimize ZFS ARC Size

This optimization adjusts the ZFS Adaptive Replacement Cache (ARC) size based on the system's available memory.

Why it's beneficial:Properly tuned ZFS ARC can significantly improve storage performance by caching frequently accessed data in RAM. This optimization ensures that ZFS uses an appropriate amount of memory based on the system's resources, balancing between storage performance and leaving enough memory for other processes.

This adjustment automates the following commands:


# Calculate ZFS ARC sizes based on RAM
RAM_SIZE_GB=$(free -g | awk '/^Mem:/{print $2}')
if [[ "$RAM_SIZE_GB" -le 16 ]]; then
    MY_ZFS_ARC_MIN=536870911  # 512MB
    MY_ZFS_ARC_MAX=536870912  # 512MB
elif [[ "$RAM_SIZE_GB" -le 32 ]]; then
    MY_ZFS_ARC_MIN=1073741823  # 1GB
    MY_ZFS_ARC_MAX=1073741824  # 1GB
else
    MY_ZFS_ARC_MIN=$((RAM_SIZE_GB * 1073741824 / 16))
    MY_ZFS_ARC_MAX=$((RAM_SIZE_GB * 1073741824 / 8))
fi

# Apply ZFS tuning parameters
cat <<EOF > /etc/modprobe.d/99-zfsarc.conf
# ZFS tuning
options zfs zfs_arc_min=$MY_ZFS_ARC_MIN
options zfs zfs_arc_max=$MY_ZFS_ARC_MAX

# Enable prefetch method
options zfs l2arc_noprefetch=0

# Set max write speed to L2ARC (500MB)
options zfs l2arc_write_max=524288000
options zfs zfs_txg_timeout=60
EOF
      

Automatic Application

All of these optimizations are automatically applied when selected in the Storage section. This automation ensures that these beneficial settings are applied consistently and correctly, saving time and reducing the potential for human error during manual configuration.