OpenSolaris

Printable Version Enter a New Search
Bug ID 6469558
Synopsis ZFS prefetch needs to be more aware of memory pressure
State 3-Accepted (Yes, that is a problem)
Category:Subcategory kernel:zfs
Keywords prefetch | zfs-perf
Responsible Engineer Richard Morris
Reported Against snv_47
Duplicate Of
Introduced In
Commit to Fix
Fixed In
Release Fixed
Related Bugs 6412053 , 6471059 , 6732803 , 6859997
Submit Date 12-September-2006
Last Update Date 11-November-2009
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.
Work Around
N/A
Comments
N/A