ZFS cache speed vs OS cache speed #14081
Unanswered
rkelleyrtp
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I'd suggest you ask It taking more time with compressed RAM enabled would track with it needing to make a copy - and thus, compress it. (Unless you meant both LZ4 and memory compression disabled, in which case I would suggest testing with LZ4 and with memory compression disabled.) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings all. I am trying to find out why ZFS disk cache seems slower than the OS disk cache.
Background: I have a Debian 11 server (VM) running Debian 11 (5.10.0-19-amd64) with 16GB RAM, 8vCPUs, ZFS 2.1.5 (from apt repository). This server has two virtual HDDs - one for EXT4 and the other for ZFS. The ZFS volume has compression=lz4 and a record size of 16K.
Over the past few days, I have noticed files are read much faster from the OS cache than from ZFS cache. I have copied the exact same data to both drives on this server and ran a simple test: Copy the files from the drive to /dev/null. Obviously, I ignore the first reads since the data is not yet in cache. However, subsequent reads come entirely from cache (as verified by htop, dstat, etc).
Test run - EXT-4
Test run - ZFS with lz4 and memory compression enabled
Test run - ZFS with lz4 and memory compression DISABLED
I am trying to find out why there is such a huge discrepancy between the EXT-4 OS cache speed and ZFS. As you can see from above, the OS cache is much, much faster than ZFS. Are there any tunables that may help to narrow the gap?
Beta Was this translation helpful? Give feedback.
All reactions