Excellent. 

    What I believe is going on is that without the madvise()/mlock() the
    general accesses to the 1 GB main history file are causing the pages to be
    flushed from the .hash and .index files too quickly.  The performance
    problems in general appear to be due to the system trying to cache more
    of the (essentially uncacheable) main history file at the expense of
    not caching as much of the (emminently cacheable) .index and .hash files.

    One possible fix would be to have the kernel track cache hits and misses
    on a file and implement a heuristic from those statistics which is used
    to reduce the 'initial page weighting' for pages read-in from the
    'generally uncacheable file'.  This would cause the kernel to reuse 
    those cache pages more quickly and prevent it from throwing away (reusing)
    cache pages associated with more cacheable files like the .index and
    .hash files.  I don't have time to do this now, but it's definitely
    something I am going to keep in mind for a later release.

                                                -Matt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to