Re: RFC - how to balance Dirty+Writeback in the face of slow writeback.

Neil Brown
2006-08-17T04:09:14Z

On Wednesday August 16, dgc@sgi.com wrote:
>
> IMO, if you've got slow writeback, you should be reducing the amount
> of dirty memory you allow in the machine so that you don't tie up
> large amounts of memory that takes a long time to clean. Throttle earlier
> and you avoid this problem entirely.

I completely agree that 'throttle earlier' is important. I just not
completely sure what should be throttled when.

I think I could argue that pages in 'Writeback' are really still
dirty. The difference is really just an implementation issue.

So when the dirty_ratio is set to 40%, that should apply to all
'dirty' pages, which means both that flagged as 'Dirty' and those
flagged as 'Writeback'.

So I think you need to throttle when Dirty+Writeback hits dirty_ratio
(which we don't quite get right at the moment). But the trick is to
throttle gently and fairly, rather than having a hard wall so that any
one who hits it just stops.

Thanks,
NeilBrown