linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* throttling dirtiers
@ 2002-07-31  8:26 Andrew Morton
  2002-07-31 20:06 ` William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Morton @ 2002-07-31  8:26 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-mm

Here's an interesting test.

- mem=512m
- Run a program which mallocs 400 megs and then madly sits
  there touching each page.
- Do a big `dd' to a file.

Everything works nicely - all the anon memory sits on the active
list, all writeback is via shrink_cache -> vm_writeback.
Bandwidth is good.

But as we discussed, we really shouldn't be doing the IO from
within the VM.  balance_dirty_pages() is never triggering
because the system is not reaching 40% dirty.

It would make sense for the VM to detect an overload
of dirty pages coming off the tail of the LRU and to reach
over and tell balance_dirty_pages() to provide throttling,

If we were to say "gee, of the last 1,000 pages, 25% were
dirty, so tell balance_dirty_pages() to throttle everyone"
then that would be too late because the LRU will be _full_
of dirty pages.

I can't think of a sane way of keeping track of the number
of dirty pages on the inactive list, because the locking
is quite disjoint.

But we can certainly track the amount of anon memory in
the machine, and set the balance_dirty_pages thresholds
at 0.4 * (total memory - anon memory) or something like
that.

Thoughts?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2002-07-31 22:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31  8:26 throttling dirtiers Andrew Morton
2002-07-31 20:06 ` William Lee Irwin III
2002-07-31 20:23   ` Benjamin LaHaise
2002-07-31 20:26     ` Rik van Riel
2002-07-31 20:59     ` William Lee Irwin III
2002-07-31 21:02     ` Andrew Morton
2002-07-31 21:14       ` Benjamin LaHaise
2002-07-31 21:25         ` Rik van Riel
2002-07-31 21:32           ` Andrew Morton
2002-07-31 21:55             ` Rik van Riel
2002-07-31 22:24               ` Andrew Morton
2002-07-31 22:32                 ` Rik van Riel
2002-07-31 21:28         ` Andrew Morton
2002-07-31 21:35           ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox