[MUD-Dev] Server stability (was: Player statistics)
Felix A. Croes
felix at dworkin.nl
Mon Jan 15 14:18:05 CET 2001
Bruce <bruce at puremagic.com> wrote:
> Par Winzell wrote:
>[...]
> > We build on top of DGD, which, like Cold, is disk-based. If
> > left alone long enough with no activity, all persistent data
> > will get swapped out, and doing a full state dump to disk is
> > instantaneous.
> >
> > That said, however, 'disk-based' is a misnomer; in actuality this
> > system is obviously a superset of a purely RAM-based one -- just
> > set the swap rate infinitely low and everything stays in memory.
>
> How does this work in DGD in more technical terms?
In DGD, LPC-level threads last only a brief while and do not run
concurrently. Objects are swapped in on access, but can only be
swapped out after the current LPC thread has completed; so if a single
thread accesses all objects, your entire database will be in memory.
There is a simple linked list of all objects in memory, with objects
moved to the head of the list upon access. At the end of each thread,
a specific, configurable fragment of all objects in memory -- say 1
out of every 100 -- will be swapped out at the tail end of this linked
list. In addition, there is an LPC-level function to swap out all
objects currently in memory, and another one to synchronize the
current state of the system to disk without actually deallocating
objects in memory.
A system that is completely idle will see no swapping out of objects,
because that normally only happens at the end of each thread.
Otherwise, since the working set of the system is typically much
larger than -- in our example -- 100 objects, there is a steady
trickle of objects being swapped out even during quiet periods.
>[...]
> > We're just reaching a 200-meg database on our Castle of Marrach
> > so it is much too early to make any kind of comparisons against
> > the large graphical games. That kind of comparison is probably of
> > minor interest anyway; I expect a larger subset of objects need
> > to be swapped in for a horizon-revealing game like EQ anyway?
> >
> > I expect in a year we'll have 3-4 gig databases... we'll see how
> > that goes.
>
> Do you have just one file for all of your saved-state? If so,
> how do you plan on handling file size limitations (the 2 or 4 gig
> file size limits on 32 bit OSes without LFS)? Or do you just run
> an OS without silly limitations? :)
It is all in a single file. Right now, DGD cannot handle state dump
files of that size unless the host OS has 64-bit longs; however,
fixing this involves changing only four or five lines of code. Since
this is a platform-dependent change, I have avoided dealing with it
as long as DGD muds remained small. The moment where this has to be
fixed is rapidly approaching, though :)
Oh, and of course serious muds run on serious operating systems.
Regards,
Felix Croes
_______________________________________________
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