From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Jeremy Cole <jeremy@jcole.us>
Cc: Linux Memory Management <linux-mm@kvack.org>
Subject: Re: Linux swapping with MySQL/InnoDB due to NUMA architecture imbalanced allocations?
Date: Fri, 24 Sep 2010 11:37:49 -0700 [thread overview]
Message-ID: <1285353469.3292.14042.camel@nimitz> (raw)
In-Reply-To: <AANLkTim1R7-FVwofw-otpGCcHqQHLDwaTYYWFS1ZhSoW@mail.gmail.com>
On Thu, 2010-09-23 at 15:29 -0700, Jeremy Cole wrote:
> 1. Is it plausible that Linux for whatever reason needs memory to be
> in Node 0, and chooses to page out used memory to make room, rather
> than choosing to drop some of the cache in Node 1 and use that memory?
> I think this is true, but maybe I've missed something important.
Your situation sounds pretty familiar. It happens a lot when
applications are moved over to a NUMA system for the first time. Your
interleaving solution is a decent one, although teaching the database
about NUMA is a much better long-term approach.
As far as the decisions about running reclaim or swapping versus going
to another node for an allocation, take a look at the
"zone_reclaim_mode" bits in Documentation/sysctl/vm.txt . It does a
decent job of explaining what we do.
Most users new to NUMA systems just prefer to "echo 0 >
zone_reclaim_mode". I've also run into a fair number of "tuning" guides
that say to do this. It will make the allocator act a lot more like if
NUMA wasn't there. It isn't as _optimized_ for NUMA locality then, but
it does tend to let you allocate memory more freely.
-- Dave
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-09-24 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 22:29 Linux swapping with MySQL/InnoDB due to NUMA architecture imbalanced allocations? Jeremy Cole
2010-09-24 18:37 ` Dave Hansen [this message]
2010-09-28 1:58 ` Jeremy Cole
2010-10-01 16:43 ` Dave Hansen
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=1285353469.3292.14042.camel@nimitz \
--to=dave@linux.vnet.ibm.com \
--cc=jeremy@jcole.us \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).