Start of changeUser file cacheEnd of change

The user file cache is used to cache all "regular" files. It caches any file, no matter what its size, and performs write-behind and asynchronous read-ahead for files. It performs I/O for all files that are 7 KB or larger. For files smaller than 7 KB, I/O is typically performed through the metadata cache.

Start of changeThe user file cache is allocated in data spaces. The default size of user_cache_size is calculated. For more information, see IOEFSPRM.End of change However, you can tailor Start of changethis sizeEnd of change to meet your performance needs, based on your overall system memory. The maximum size for user_cache_size is 65,536 MB (64 GB). The general rule for any cache is to ensure a good hit ratio. Additionally, it is good to have a user file cache that is large enough for write-behind activity to occur. If the cache is too small, you need to recycle buffers more frequently and that might degrade write-behind performance. The MODIFY ZFS,QUERY,ALL command output shows the cache hit ratio, which is actually the "fault ratio". To get the hit ratio, subtract the fault ratio from 100%.

In general, you should have Start of changea hit ratioEnd of change of at least 80% or more. Start of changeA hit ratio over 90% will typically give good performance.End of change However, the hit ratio is very much workload-dependent. For example, a zFS file system that is exported exclusively to SMB clients by using the SMB server will likely have a low hit ratio. The low hit ratio occurs because the SMB client and the SMB server cache data, which reduces the zFS cache hit ratio. This reduction is expected and is not considered a problem.