[DGD] alternate swapout pressure system

Shentino shentino at gmail.com
Wed Jul 25 14:33:27 CEST 2012


On Tue, Jul 24, 2012 at 8:05 PM, Jared Maddox <absinthdraco at gmail.com> wrote:
> A priority system could be used, but the priority weighting would
> presumably require changes to the .dgd file.

Eventually, yes.

Mind you this is just theoretical and I am far from getting things
into a state that will pass muster with felix (and for good
reasons...my latest attempt turned out to be a segfaulting nightmare).

But my naive first approach would be to handle things in the following order:

1.  hard memory capping
2.  interrupt handling
3.  I/O handling
4.  Callout handling
5.  soft memory cappping
6.  swap rebuild

Steps 1 and 5 would be transient and fall through in the main loop
once handled.  Steps 2 through 4 would trigger a "continue" statement
in the main loop and jump back to the start if there was activity,
which starves the lower priority actions of runtime until the higher
priority things are handled.

Also as a potential way to mitigate the present lack of support for
incremental statedumps, swap rebuild would be an idle priority action
of rebuilding one object at a time as rapidly as possible, but only
using CPU time that was left over after the higher ranking lions ate
their shares.

Until I segfaulted from underflowing the callout table (still trying
to figure out why), rearranging the main loop to accomplish this was
quite fruitful in keeping DGD busy with housekeeping and cleanup
without sacrificing latency when something important happened.



More information about the DGD mailing list