[DGD] Dealing with huge objects

Petter Nyström jimorie at gmail.com
Mon Jul 16 00:14:07 CEST 2007


Yes, that is a good compromise to the implementation, thanks.

But about the config file. I would be very glad to hear some word on
what is considered a "sane" configuration of DGD. For example, I am
now trying this memory related configuration, but have no real grasp
of what is sensible. Even though my machine is old, I wouldn't mind
DGD using a couple Mb or so of its working memory. And is there a
point with having the values being powers of 2? Is anything else
non-optimal?

swap_size       = 32768;
cache_size      = 100;
sector_size     = 512;
swap_fragment   = 64;
static_chunk    = 64512;
dynamic_chunk   = 261120;

Thanks,

Jimorie

On 7/15/07, Felix A. Croes <felix at dworkin.nl> wrote:
> "=?ISO-8859-1?Q?Petter_Nystr=F6m?=" <jimorie at gmail.com> wrote:
>
> >[...]
> > My first attempt at this has simply been to allocate the grid as a
> > two-dimensional integer array in a daemon type object. The problem is
> > that this grid needs to be rather huge to accommodate for the world I
> > want to build. My test case is using a 1000 x 1000 grid - 1 million 32
> > bit integer values. When DGD tries to swap out the object holding this
> > data, it crashes as it runs out of sectors. I assume this can easily
> > be solved by increasing the number of sectors given to DGD at startup.
> > But it got me thinking that my approach probably isn't so good to
> > start with.
>
> Rather than having a 1000x1000 grid, you could add a level of
> indirection and have a 10x10 grid of a 100x100 grid.  Each 100x100
> grid could be stored in a separate object.  That way, only those
> parts of the 10x10 grid that are actually in use would have to be
> swapped in.
>
> Regards,
> Dworkin
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>



More information about the DGD mailing list