Bug #57807 ndb sensitive to numa settings
Submitted: 28 Oct 2010 13:23 Modified: 29 Oct 2010 11:13
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[28 Oct 2010 13:23] Jonas Oreland
Description:
MySQL Cluster is sensitive too numa settings and most users
don't use numactl.

See 
http://blogs.sun.com/LinuxJedi/entry/mysql_cluster_and_numa
http://jcole.us/blog/archives/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/

This patch therefore *default* enables interleaving
(equivalent of booting with numa=off).
This behavior can be turned off by setting "Numa=0" in config.ini

So, iff you're are using numactl, use "Numa=0" in your config,
so that ndbd does not override your usage.

NOTE: Patch only works on linux and only if libnuma.so is installed on
  platform.

How to repeat:
Run on numa machine,

Suggested fix:
.
[28 Oct 2010 13:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/122209

3902 Jonas Oreland	2010-10-28
      ndb - bug#57807 - enable numa-interleaving per default
[28 Oct 2010 13:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/122212

3903 Jonas Oreland	2010-10-28
      ndb - bug#57807 - don't link NdbNuma.cpp into portlib, as then everythings needs to link -ldl...only do with ndb(mt)d
[28 Oct 2010 13:48] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:jonas@mysql.com-20101028134530-mr42t9to7nmmlgsh) (version source revid:jonas@mysql.com-20101028134530-mr42t9to7nmmlgsh) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[28 Oct 2010 14:05] Jonas Oreland
pushed to 7.0.20 and 7.1.9

DOCS: Settings are
Numa: 0 - turn off all numa handling in ndbd
Numa: 1 - let ndb do "best effort" numa handling (currently interleave on all nodes)
[29 Oct 2010 11:13] Jon Stephens
Documented feature change in the NDB-7.0.20 and 7.1.9 changelogs, as follows:

        ndbd now bypasses use of Non-Uniform Memory Access support on Linux
        hosts by default. If your system supports NUMA, you can enable it and
        override ndbd's use of interleaving by setting the Numa configuration
        parameter which is added in this release. See "MySQL Cluster Realtime 
        Performance Parameters" [link], for more information.

Added new parameter description to docs, parameter tables.

Closed.