[1536] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: [patch] optimize method cache

daemon@ATHENA.MIT.EDU (Tue Dec 21 14:35:24 1999 )

From: "Bruce Mitchener, Jr." <bruce@puremagic.com>
To: <coldstuff@cold.org>
Date: Tue, 21 Dec 1999 11:25:18 -0800
Reply-To: coldstuff@cold.org

Jay Carlson wrote:
>> The other optimization that should be addressed and that was left out of
>> both of those emails, is that negative method lookups should be cached.
>
>Experience with this in MOO has been iffy.  Here's a quote from LambdaMOO:
>
>>@verb-cache-stats
>Hits: 961,763,137, negative hits: 24,229,258, misses: 8,807,049,
generations: 2,157
>Ratio: 109.20:1, or 99.08%
>[...]
>>@uptime
>The server has been up for 8 days, 22 hours, 1 minute, and 10 seconds.
>
>I'm not sure it's worth the possible cache pollution.  Very
>core-dependent though.  The code's already done, so I doubt
>we'll be taking it out.


This was motivated by someone's core, in which this is a fairly common
construct:

catch ~methodnf {
   target.do_something();
} with {
   ....
}

So, for them, it would be a considerable win in some parts of their core.
It would win even more with my traceback optimizations that I have laying
around in the dead/abandoned Genesis 1.2 work.

>> However, with the addition of that much extra information to the cache,
>> it is well past time for someone to look at adding monitoring data to the
>> various caches and tracking the hit/miss/overwrite rates to help people
>> tune their cache sizes.
>
>Agreed.


All of this is stuff that you, Ben, and I discussed about a year ago (and
was old hat in MOO at that point).

Of course, all of this is useless if people do evals often since they end up
invalidating the entire cache currently. (For details, see the emails for
which I provided URLs.)

 - Bruce