On Fri, Jul 30, 1999 at 09:51:35AM -0700, Matthew Dillon wrote:
>
> I'm not sure I see how MADV_FREE could slow performance down unless,
> perhaps, it is the overhead of the system call itself. e.g. if malloc
> is calling it on a page-by-page basis and not implementing any hysteresis.
>
It's the system call overhead. Adding (more) hysteresis would reduce
the overhead by some factor, but we'd still be making unnecessary
MADV_FREE calls. Calling MADV_FREE accomplishes nothing unless
the system is actually short of memory. The right way to address
this problem is likely to add a mechanism to the VM system that
sends a signal to the process when MADV_FREE would actually be
beneficial.
> 2% isn't a big deal. MADV_FREE theoretically makes a big impact on
> paging performance in a heavily loaded & paging system. If your tests
> were run on a system that wasn't paging, you weren't testing the right
> thing.
>
99% of our user base, whose machines aren't thrashing during a "make world"
or other normal operation, shouldn't pay a 2% penalty to produce
a theoretical improvement for the 1% that are. At best, that's "optimizing"
the infrequent case at the expense of the frequent, not a good trade-off.
In any case, the man page for malloc/free explains how to change
the default, if you're a part of the "oppressed" 1%.
Alan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message