[MUD-Dev] Persistent Worlds

Ryan Rhodes ryanshaerhodes at hotmail.com
Thu Feb 22 10:01:41 CET 2001


----- Original Message -----
From: "Jon Lambert" <tychomud at ix.netcom.com>
To: <mud-dev at kanga.nu>
Sent: Wednesday, February 21, 2001 6:46 AM
Subject: RE: [MUD-Dev] Persistent Worlds


Jon Lambert wrote:
>
> > If I am understanding you right any objects maintained in cache by
> > the Object Model would be in duplicate to the version maintained in
> > disk / cache by the RDBMS?
>
> Maybe, maybe not.  You don't have much control over what objects
> appear in an RDBMS's data cache.
>

Right, just a simplification.  I understand you here.

[[Snip]]
>
> > Is there a hard (possibly configurable) limit on how many objects
> > the object manager will cache?
>
> Yes.  I allocate the cache memory from non-pageable memory (NT's
> VirtualLock).  That memory is limited by both the OS configuration and
> real memory on the machine.  The cache is reconfigurable from within
> the server environment.
>

When you say reconfigurable, can you allocate memory or set limits on
a per class basis?

> > Or, perhaps a better question, do you just shoot yourself in the
> > foot by trying to guess the most frequently accessed objects in the
> > first place, rather than letting a nice routine handle it?
>
> There's no guessing involved.
>
>   1) A cached object's age is incremented every n seconds.
>
>   2) Any access to a cached object causes its age to be reset to 0.
>
>   3) Cached objects above an age threshold will be bumped out of the
>   cache, if the space is needed.

I think your hearing the reverse of what I'm saying here.  Yeah,
theres no guessing involved with this algorythm, but if you then made
it reconfigureable from within the server and allocated more memory to
certain classes, like the player class, that would be guessing.  At
least thats what I'm saying here.

> > It just seems as though the player object should always be in
> > memory.
>
> Now _that_ would be guessing.  :-)
>

Right :)  Do you guess?

> There's another problem you will have with Java (and even with
> controlled memory allocation to a general memory heap).  The
> operating system controls whether your cache is in memory or has
> been paged out to disk.  I don't have that problem since I've
> instructed the OS to keep it's dirty paws off it.  

I don't follow you here??  Assuming memory is available to the JVM, if
I allocate memory for an object it will be in memory, right?  Of
course I'm asking myself now why I'm even talking about a memory
caching system in java, because with the garbage collection I can't
even really deallocate the memory to take an object out of the cache
anyway can I?

Ryan Rhodes
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list