public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Thomas Zehetbauer <thomasz@hostmaster.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: NUMA API observations
Date: Tue, 15 Jun 2004 15:27:15 +0200	[thread overview]
Message-ID: <m3wu29kl3g.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <27lI4-29E-19@gated-at.bofh.it> (Thomas Zehetbauer's message of "Tue, 15 Jun 2004 15:00:24 +0200")

Thomas Zehetbauer <thomasz@hostmaster.org> writes:

> Looking at these numastat results and the default policy it seems that
> memory is primarily allocated on the first node which in turn means a
> unnecessarily large amount of page faults on the second node.

NUMA memory policy has nothing to do with page faults.

If you get most allocations on the first node it either means most 
programs run on the first node (assuming they don't use NUMA API
to change their memory affinity) or more likely the programs running
on node 0 need more memory than those running on node 1.

That's easily possible, e.g. a typical desktop uses most of its
memory in the X server. If it runs on node 0 you get such skewed 
statistics. On servers it is often similar.

One way to combat that if it was really a problem would be to run the
X server with interleaving policy (numactl --interleave=all
XFree86)[1], but I would recommend careful benchmarks first if it's
really a win. Normally better local memory latency is the better
choice.

[1] Don't do that with startx or xinit, the rest of the X session should
probably not use that.

> I wonder if it is possible to better balance processes among the nodes
> by e.g. setting nodeAffinity = pid mod nodeCount

I assume you mean scheduling not memory affinity here. execve() and
clone() do that kind of (but based on node loads, not pids), but not fork.

-Andi


       reply	other threads:[~2004-06-15 13:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <271SM-3DT-7@gated-at.bofh.it>
     [not found] ` <27lI4-29E-19@gated-at.bofh.it>
2004-06-15 13:27   ` Andi Kleen [this message]
     [not found] ` <272lY-44B-49@gated-at.bofh.it>
     [not found]   ` <2772a-7VK-9@gated-at.bofh.it>
     [not found]     ` <279nf-1id-3@gated-at.bofh.it>
2004-06-15 13:52       ` NUMA API observations Bill Davidsen
2004-06-15  4:59 Manfred Spraul
2004-06-15  6:18 ` Paul Jackson
2004-06-15 11:03 ` Andi Kleen
2004-06-15 17:37   ` Manfred Spraul
2004-06-15 18:32     ` Paul Jackson
2004-06-15 18:18   ` Paul Jackson
  -- strict thread matches above, loose matches on Subject: below --
2004-06-14 15:36 Anton Blanchard
2004-06-14 16:17 ` Andi Kleen
2004-06-14 21:21   ` Paul Jackson
2004-06-14 23:44     ` Andi Kleen
2004-06-15  0:06       ` Paul Jackson
2004-06-15  0:20         ` Andi Kleen
2004-06-15  0:25           ` Paul Jackson
2004-06-14 21:40   ` Anton Blanchard
2004-06-14 23:49     ` Andi Kleen
2004-06-15 13:50       ` Jesse Barnes
2004-06-15 12:53 ` Thomas Zehetbauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3wu29kl3g.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomasz@hostmaster.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox