|
Description
|
[johansen 9/11/2006]
While showing off ZFS to a potential customer, billm encountered a problem with ZFS's prefetch mechanism. In the case of this customer, there were many clients simultaneously reading different streams of media. All of these streams were being served through ZFS and Apache. Unfortunately for ZFS, there were more clients reading than available memory. The prefetch mechanism worked as designed; however, it prefetched too aggressively and evicted data that was about to be used by one client in order to satsify other client requests. Since the ZFS prefetch mechanism presently has no concept of available system memory, it was unable to scale back the aggressiveness of its read-ahead and victimized data that might have been used by reading clients.
The read-ahead mechanism really needs to be aware of how much memory is available and how many concurrent readers exist. When this number exceeds a certain threshold, ZFS should scale back the amount of memory it uses to read-ahead, and after that, should limit the number of active prefetch streams.
|