How to copy and transfer files remotely on Linux using scp and rsync

ZFS on Linux uses the Adaptive Replacement Cache (ARC) to store frequently accessed data in memory. On Ubuntu/Debian, you can set the size of the ARC by modifying the kernel parameters.

  1. Check your current ARC size by running the following command:
cat /proc/spl/kstat/zfs/arcstats
  1. To set the ARC size, you will need to add a kernel parameter to the GRUB configuration file. Open the file using your preferred text editor:
sudo nano /etc/default/grub
  1. Add the following line to the GRUB_CMDLINE_LINUX_DEFAULT variable, replacing [size] with the desired size in bytes:
GRUB_CMDLINE_LINUX_DEFAULT="... zfs_arc_max=[size] ..."
  1. Save and close the file.
  2. Update the GRUB configuration by running the following command:
sudo update-grub
  1. Reboot the system for the changes to take effect.
  2. After reboot, you can check the current ARC size again using the command from step 1 and confirm that it matches the value you set in step 3.

Note: The maximum size of the ARC depends on the amount of physical memory in your system and the current usage of the memory. It is recommended to set the ARC size to less than 50% of the available memory.

Leave a Comment