Re: [RFC] Make balance_dirty_pages zone aware (1/2)

From: Martin J. Bligh (mbligh_at_aracnet.com)
Date: 11/25/03

  • Next message: Joshua Schmidlkofer: "Re: RAID-0 read perf. decrease after 2.4.20"
    Date:	Mon, 24 Nov 2003 20:58:24 -0800
    To: Andrew Morton <akpm@osdl.org>
    
    

    >> Well ... not so sure of this as I once was ... so be gentle with me ;-)
    >> But if the system has been running for a while, memory is full of pagecache,
    >> etc. We try to allocate from the local node, fail, and fall back to the
    >> other nodes, which are all full as well. Then we wake up kswapd, but all
    >> pages in this node are dirty, so we block for ages on writeout, making
    >> mem allocate really latent and slow (which was presumably what
    >> balance_dirty_pages was there to solve in the first place).
    >
    > It is possible. You'd be pretty unlucky to dirty so much lowmem when there
    > is such a huge amount of highmem floating about, but yes, if you tried hard
    > enough...

    I'm not really worried about lowmem vs highem - that was almost an
    afterthought. I'm more worried about the NUMA bit - it's easy to fill
    one node's memory completely with dirty pages by just a writer running
    on that node.
     
    > I have a feeling that some observed problem must have prompted this coding
    > frenzy from Matthew. Surely some problem was observed, and this patch
    > fixed it up??

    No, just an observation whilst looking at balance_dirty_pages, that it's
    not working as intended on NUMA. It's just easy to goad Matt into a frenzy,
    I guess ;-) ;-)

    "dd if=/dev/zero of=foo" would trigger it, I'd think. Watching the IO
    rate, it should go wierd after ram is full (on a 3 or more node system,
    so there's < 40% of RAM for each node). Yeah, I know you're going to give
    me crap for not actually trying it ... and rightly so ... but it just
    seemed so obvious ... ;-)

    >> > If we make the dirty threshold a proportion of the initial amount of free
    >> > memory in ZONE_NORMAL, as is done in 2.4 it will not be possible to fill
    >> > any node with dirty pages.
    >>
    >> True. But that seems a bit extreme for a system with 64GB of RAM, and only
    >> 896Mb in ZONE_NORMAL ;-) Doesn't really seem like the right way to fix it.
    >>
    >
    > Increasing /proc/sys/vm/lower_zone_protection can be used to teach the VM
    > to not use lowmem for pagecache. Does this solve the elusive problem too?

    Don't think so - see comment above re NUMA.

    M.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Joshua Schmidlkofer: "Re: RAID-0 read perf. decrease after 2.4.20"

    Relevant Pages

    • Re: calloc ( ) failed ... but enough RAM ...
      ... I know how many RAM available has my system by simply looking into the ... > You are ignoring issues like address space fragmentation. ... > safely assume that allocating a contiguous chunk of memory this size is unlikely. ... > There is no way to answer your question about how much space you can allocate; ...
      (microsoft.public.vc.mfc)
    • Re: No memory although more than 1GB free
      ... each process is able to allocate 2GB at maximum. ... > However, when my crucial application runs out of memory, Task Manager ... That's why I think there's fragmentation at work. ... Remember - you are not running out of physical RAM, ...
      (microsoft.public.vc.language)
    • Re: No memory although more than 1GB free
      ... each process is able to allocate 2GB at maximum. ... > However, when my crucial application runs out of memory, Task Manager ... That's why I think there's fragmentation at work. ... Remember - you are not running out of physical RAM, ...
      (microsoft.public.windowsxp.perform_maintain)
    • Re: out of memory errors & Pocket PC program vs. storage RAM allocatio
      ... >Is there a trick to to getting Pocket PC 2002 to allocate more RAM for an ... >mode, 275k in release mode, and uses ~1MB of RAM when running. ... it occassionally posts an out of memory dialog during parsing. ...
      (microsoft.public.pocketpc.developer)
    • Tru64 issues with Infinite limits
      ... An automated test in my nightly build was failing due to Out of Memory ... Cannot allocate block 146 ...
      (comp.unix.tru64)

    Loading