[1535] 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:19:07 1999 )

Date: Tue, 21 Dec 1999 13:01:26 -0600 (CST)
From: Jay Carlson <nop@place.org>
To: coldstuff@cold.org
In-Reply-To: <199912210751.XAA26720@portland.puremagic.com>
Reply-To: coldstuff@cold.org

> This is a patch to help optimize the method cache some.
> It changes the following:
> 1) Do not invalidate the cache when destroying an object that has
>    no methods and no children.  This'll prevent the method cache
>    from getting nuked everytime someone connects as a user, or via
>    the web interface.


> 3) In setting the access on a method, only invalidate in the
>    specific instance in which you need to invalidate.  Also,
>    save some work and don't flag it as dirty unless you need to
>    do so.

This looks...familiar. :-)

> 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:

Hits: 961,763,137, negative hits: 24,229,258, misses: 8,807,049, generations: 2,157
Ratio: 109.20:1, or 99.08%
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.

> 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.