Q: Why does my zfs pool get slower about a after a week?
I tried looking at two different filesystems on the system: /var/tmp (LVM, ext4) and a web server directory from the zfs pool. I repeatedly checked both files so they should be in cache / ARC. If both of the files are getting served out of RAM, why is /var/tmp 275% faster?
Server
This is from a AMD EPYC 7232P 8-Core server with a 3-vdev raidz pool.
$ grep Y /etc/os-release
PRETTY_NAME="CentOS Stream 9"
$ uname -a
Linux ww4 5.14.0-366.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 14 23:37:14 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Download Times
$ time scp ww4-san:/home/VHOSTS/candelatech.com/html/private/downloads/r5.5.4/LANforgeServer-5.5.4_MacOS-10.15.tar.gz /tmp
LANforgeServer-5.5.4_MacOS-10.15.tar.gz 100% 105MB 46.4MB/s 00:02
real 0m2.489s
user 0m0.079s
sys 0m0.239s
$ time scp ww4-san:/var/tmp/LANforgeServer-5.5.4_MacOS-10.15.tar.gz /tmp
LANforgeServer-5.5.4_MacOS-10.15.tar.gz 100% 105MB 853.7MB/s 00:00
real 0m0.334s
user 0m0.068s
sys 0m0.127s
$ time scp ww4-san:/home/VHOSTS/candelatech.com/html/private/downloads/r5.5.4/LANforgeServer-5.5.4_MacOS-10.15.tar.gz /tmp
LANforgeServer-5.5.4_MacOS-10.15.tar.gz 100% 105MB 56.5MB/s 00:01
real 0m2.087s
user 0m0.081s
sys 0m0.165s
$ time scp ww4-san:/var/tmp/LANforgeServer-5.5.4_MacOS-10.15.tar.gz /tmp
LANforgeServer-5.5.4_MacOS-10.15.tar.gz 100% 105MB 1.0GB/s 00:00
real 0m0.313s
user 0m0.072s
sys 0m0.102s
Pool Architecture
$ zpool iostat -v
capacity operations bandwidth pool alloc free read write read write
ww4-pool 21.1T 11.6T 3.67K 143 1.66G 2.17M
raidz1-0 7.03T 3.87T 1.22K 47 568M 740K
ata-WDC_WDS400T1R0A-68A4W0_222445800721 - - 421 15 191M 247K
ata-WDC_WDS400T1R0A-68A4W0_22300C800097 - - 420 16 190M 247K
ata-WDC_WDS400T1R0A-68A4W0_223667800002 - - 413 15 187M 247K
raidz1-1 7.03T 3.88T 1.22K 47 566M 740K
ata-WDC_WDS400T1R0A-68A4W0_223667800284 - - 416 16 188M 247K
ata-WDC_WDS400T1R0A-68A4W0_223667800464 - - 421 15 192M 247K
ata-WDC_WDS400T1R0A-68A4W0_223667800466 - - 409 15 186M 247K
raidz1-2 7.02T 3.88T 1.22K 47 567M 740K
ata-WDC_WDS400T1R0A-68A4W0_223667800467 - - 416 15 189M 247K
ata-WDC_WDS400T1R0A-68A4W0_223667800468 - - 418 15 190M 247K
ata-WDC_WDS400T1R0A-68A4W0_223667800500 - - 416 15 189M 247K
Output of arcstat 30
time read miss miss% dmis dm% pmis pm% mmis mm% size c avail
14:09:37 15K 1.6K 10 1.5K 10 98 100 3 0 48G 48G 18G
14:09:40 8.4K 1.5K 18 1.5K 18 4 93 2 0 48G 48G 18G
14:09:43 10K 1.6K 15 1.6K 14 13 100 0 0 48G 48G 18G
14:09:46 11K 1.6K 13 1.5K 13 12 100 1 0 47G 48G 18G
14:09:49 9.9K 1.6K 15 1.6K 15 13 19 19 0 47G 48G 18G
14:09:52 4.7K 1.7K 35 1.7K 35 3 100 0 0 47G 48G 18G
14:09:55 4.9K 1.7K 35 1.6K 34 140 100 2 0 48G 48G 18G
14:09:58 4.8K 1.7K 35 1.5K 33 169 82 0 0 47G 48G 18G
14:10:01 13K 1.6K 11 1.4K 10 179 99 2 0 48G 48G 18G
14:10:04 21K 1.6K 7 1.3K 6 281 100 0 0 48G 48G 18G
14:10:07 8.4K 1.6K 19 1.5K 17 157 100 0 0 48G 48G 18G
14:10:10 10K 1.5K 15 1.4K 14 133 100 1 0 48G 48G 18G
14:10:13 20K 1.6K 7 1.3K 6 276 99 18 0 48G 48G 18G
14:10:16 17K 886 5 647 3 239 99 1 0 48G 48G 18G
14:10:19 3.9K 909 23 891 23 18 100 4 0 48G 48G 18G
14:10:22 3.2K 898 27 868 27 29 100 1 0 48G 48G 18G
14:10:25 3.0K 966 32 963 32 3 100 1 0 48G 48G 18G
Modprobe.d/zfs.conf
options zfs zfs_arc_max=51539607552
options zfs zfs_resilver_min_time_ms=18000
options zfs zfs_arc_min=17179869184
options zfs zfs_vdev_scrub_min_active=24
options zfs zfs_vdev_scrub_max_active=64
options zfs zfs_vdev_sync_write_min_active=8
options zfs zfs_vdev_sync_write_max_active=32
options zfs zfs_vdev_sync_read_min_active=8
options zfs zfs_vdev_sync_read_max_active=32
options zfs zfs_vdev_async_read_min_active=8
options zfs zfs_vdev_async_read_max_active=32
options zfs zfs_vdev_async_write_min_active=8
options zfs zfs_vdev_async_write_max_active=32
options zfs zfs_txg_timeout=15
options zfs zfs_prefetch_disable=0
options zfs l2arc_write_max=524288000
options zfs l2arc_headroom=12
options zfs zfs_immediate_write_sz=262144
strace -ttt /var/tmp/thing.tar.gz
1792015559.847692 read(3, ""..., 32768) = 32768
1792015559.847763 read(3, ""..., 32768) = 32768
1792015559.847840 read(3, ""..., 32768) = 22646
about 0.071ms per read
strace -ttt /home/VHOSTS/candelatech.com/…/thing.tar.gz
1792015762.246942 read(3, ""..., 32768) = 32768
1792015762.249041 read(3, ""..., 32768) = 32768
1792015762.251628 read(3, ""..., 32768) = 32768
1792015762.253838 read(3, ""..., 32768) = 32768
about 2.587ms per read…
After reboot I’m reading about 2.5 - 7.1ms per read.
* How much does it matter that /var/tmp is on an NVMe, compared to just hitting fs cache?
* Is there anything I can tune?