ZFS Performance Monitoring

ZFS performance management is handled differently than with older generation file systems. In ZFS, I/Os are scheduled similarly to how jobs are scheduled on CPUs. The ZFS I/O scheduler tracks a priority and a deadline for each I/O. Within each deadline group, the I/Os are scheduled in order of logical block address.

Writes are assigned lower priorities than reads, which can help to avoid traffic jams where reads are unable to be serviced because they are queued behind writes. (If a read is issued for a write that is still underway, the read will be executed against the in-memory image and will not hit the hard drive.)

In addition to scheduling, ZFS attempts to intelligently prefetch information into memory. The algorithm tries to pick information that is likely to be needed. Any forward or backward linear access patterns are picked up and used to perform the prefetch.

The zpool iostat command can monitor performance on ZFS objects:

  • USED CAPACITY — Data currently stored
  • AVAILABLE CAPACITY — Space available
  • READ OPERATIONS — Number of operations
  • WRITE OPERATIONS — Number of operations
  • READ BANDWIDTH — Bandwidth of all read operations
  • WRITE BANDWIDTH — Bandwidth of all write operations

The health of an object can be monitored with:

# zpool status