[DGD]Re: Performance Characteristics

Felix A. Croes felix at dworkin.nl
Sat Sep 23 22:18:30 CEST 2000


"Tavis Elliott" <tavise at nwlink.com> wrote:

> I am currently experiencing some performance concerns with my game using
> DGD, and I was wondering if anyone has some insight (or documentation I can
> go look at) which describes some of the config options, particularly:
>
> swap_size	= 65535;		/* # sectors in swap file */
> cache_size	= 256;			/* # sectors in swap cache */
> sector_size	= 1024;			/* swap sector size */
> swap_fragment	= 512;			/* # of objects to swap out */
> static_chunk	= 64512;		/* static memory chunk */
> dynamic_chunk	= 523264;		/* dynamic memory chunk */
>
> The above are taken from my configuration.  I'd like to know what the exact
> meaning of static_chunk, and dynamic_chunk are, and I'm also interested to
> know how they relate to the swap file.  At first glance it looks like the
> amount of cache I have configured is woefully low compared to the total size
> of the swap file.  Is this true?

No.  The cache in question is just the swap sector cache -- it doesn't
include all objects currently in memory.  Enlarging the cache may
speed up your mud by reducing I/O, but it doesn't directly affect CPU
usage.

Static memory remains allocated until explicitly freed.  Dynamic memory
is automatically freed when objects are swapped out.  The chunks are
the units of allocation for the respective memory managers.


> I am experiencing periods of very high cpu usage, (on the order of 50% of
> the total machine cpu) which I cannot account for in the mudlib.  I have
> placed timings around all the sections of execution the mudlib is involved
> with, and I can only account for about 50% of the cpu usage, on average.

Then the rest of the time must be spent in housekeeping tasks, most
likely swapping objects in and out.  Do you happen to have some very
large objects in your mud which are often modified?  Such objects will
be slow in swapping.

You can turn off swapping altogether with:

    swap_fragment = 0;

This still leaves an occasional system event where all objects are
swapped out to make more room for objects in static memory.  You
can turn that off, as well, with:

    static_chunk = 0;

which prevent static memory from being allocated in contiguous chunks.

Turning off swapping will increase memory usage, but since your
swapfile is at most 64 Mb in size, and you have 256 Mb of memory
available, this shouldn't be that much of a problem.  Even if you
do intent to use swapping, turning it off temporarily may help
you account for the mud's CPU usage.

Regards,
Dworkin

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list