[DGD] alternate swapout pressure system

Jared Maddox absinthdraco at gmail.com
Tue Jul 24 00:39:22 CEST 2012


> Date: Sun, 22 Jul 2012 14:37:29 -0700
> From: Shentino <shentino at gmail.com>
> To: "All about Dworkin's Game Driver" <dgd at dworkin.nl>
> Subject: [DGD] alternate swapout pressure system
> Message-ID:
> 	<CAGDaZ_rSyFxGXeMqXQOgpfJaO4wca+Kk6L0DyWdWLiCVJ=3bVg at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> What if instead of basing swapout rate on the number of resident
> objects, I instead based it on dynamic memory load?
>
> like say, a soft limit below which nothing is swapped out at all, and
> then each task results in one object being swapped out per X amount of
> memory used over the soft limit?
>
> And also, perhaps a hard limit of "swapout until memory usage goes
> back down below this mark"
>
> I've done a bit of a prototype of this and it seems to work well so
> far, any thoughts on this?
>

> Date: Sun, 22 Jul 2012 16:39:50 -0700
> From: Shentino <shentino at gmail.com>
> To: "All about Dworkin's Game Driver" <dgd at dworkin.nl>
> Subject: Re: [DGD] alternate swapout pressure system
> Message-ID:
> 	<CAGDaZ_qj48ThLoLcD_34K6DMiucaq=y=mCgwXH41B9xoyVxDsw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> One more thing.
>
> The hard memory cap idea is mostly intended to keep DGD from pissing
> off the OS if the mud grows too big.
>
> I figured that it's better for DGD to evict objects than for the OS to
> start paging, so the hard cap would proabably be proportional to total
> system RAM.
>

If I ever spend enough time on my GUI patch to get it working then I'm
planning to use it for a toy windowing system, so this definitely
interests me.

I don't think I ever looked very hard at the code that does this,
could the swapout tests be moved to a single function, so that any
other changes to them can be contained? I figure that making one call
for multiple tests should be easier to deal with than putting all of
the tests directly into the actual swapping code.



More information about the DGD mailing list