Bug #80288 missing innodb_numa_interleave
Submitted: 5 Feb 2016 18:09 Modified: 19 Aug 2016 2:23
Reporter: Daniel Bakken Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S2 (Serious)
Version:5.7.11, 5.7.12 OS:Debian (8.3)
Assigned to:

[5 Feb 2016 18:09] Daniel Bakken
Description:
InnoDB NUMA interleave support is missing from MySQL 5.7.11 on Debian Jessie. MySQL is unable to start with innodb_numa_interleave=ON in my.cnf. The variable is missing when queried with SHOW VARIABLES:

Server version: 5.7.11 MySQL Community Server (GPL)
...
mysql> show variables like 'innodb_numa%';
Empty set (0.01 sec)

How to repeat:
Set innodb_numa_interleave=ON in my.cnf and attempt to start MySQL 5.7:

2016-02-05T17:23:52.380620Z mysqld_safe Starting mysqld daemon with databases from /data/mysql
...
2016-02-05T17:24:05.739383Z 0 [ERROR] unknown variable 'innodb_numa_interleave=ON'
2016-02-05T17:24:05.739426Z 0 [ERROR] Aborting
2016-02-05T17:24:09.839973Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[7 Feb 2016 13:31] Umesh Shastry
Hello Daniel,

Thank you for the bug report.
I'm seeing this issue even with the Linux Generic tarball builds(NUMA enabled systems) ON EL7.

Thanks,
Umesh
[10 Feb 2016 3:14] tsubasa tanaka
Reverting this commit and innodb_numa_interleave appears again.

https://github.com/mysql/mysql-server/commit/5d467636d7a86a40ac5d7edef29144ac4067e48f

```
$ cd
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.11.tar.gz
$ tar xf mysql-boost-5.7.11.tar.gz
$ cd mysql-5.7.11
$ cmake -DBUILD_CONFIG=mysql_release -DWITH_BOOST=boost -DWITH_NUMA=1 .
$ grep NUMA CMakeCache.txt
//Explicitly set NUMA memory allocation policy
WITH_NUMA:BOOL=ON
//Test HAVE_LIBNUMA
HAVE_LIBNUMA:INTERNAL=1
HAVE_NUMAIF_H:INTERNAL=1
$ make
$ sudo make install
$ /usr/local/mysql/bin/mysqld --help --verbose | grep innodb-numa-interleave

$ cd
$ git clone https://github.com/mysql/mysql-server.git
$ cd mysql-server/
$ git diff -r 5d467636d7a86a40ac5d7edef29144ac4067e48f 5d467636d7a86a40ac5d7edef29144ac4067e48f~ > /tmp/bug80288_revert.patch

$ cd
$ cd mysql-5.7.11
$ patch < /tmp/bug80288_revert.patch
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
|index f767599..3e58415 100644
|--- a/storage/innobase/buf/buf0buf.cc
|+++ b/storage/innobase/buf/buf0buf.cc
--------------------------
File to patch: storage/innobase/buf/buf0buf.cc
patching file storage/innobase/buf/buf0buf.cc
Hunk #2 succeeded at 1429 with fuzz 2.
can't find file to patch at input line 135
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
|index 1bfa0fd..3c3d8a0 100644
|--- a/storage/innobase/handler/ha_innodb.cc
|+++ b/storage/innobase/handler/ha_innodb.cc
--------------------------
File to patch: storage/innobase/handler/ha_innodb.cc
patching file storage/innobase/handler/ha_innodb.cc
Hunk #1 succeeded at 19553 (offset 226 lines).
Hunk #2 succeeded at 19878 (offset 226 lines).

$ make clean
$ make
$ sudo make install
$ /usr/local/mysql/bin/mysqld --help --verbose | grep innodb-numa-interleave
  --innodb-numa-interleave
innodb-numa-interleave                                       FALSE
```
[23 Mar 2016 17:57] Shane Bester
also:
http://bugs.mysql.com/bug.php?id=78953
(innodb_numa_interleave is not available in generic linux .tar.gz)
[7 Apr 2016 20:03] Daniel Bakken
Any idea when this bug will be fixed? This is a key feature, and it disappearing is a serious barrier to adopting MySQL 5.7.
[2 May 2016 7:47] Umesh Shastry
Bug #81272 marked as duplicate of this
[27 May 2016 8:12] Saverio M
This is the link to the correct fix, found in the Percona distro:

    https://github.com/percona/percona-server/commit/f861d7927251e6cd18938b752ac0ac6d1c73fc2e

Full patch:

    commit f861d7927251e6cd18938b752ac0ac6d1c73fc2e
    Author: Tomislav Plavcic <tomislav.plavcic@percona.com>
    Date:   Thu May 5 11:16:23 2016 +0200

        Fix for missing innodb_numa_interleave server variable (#1561091)

    diff --git a/config.h.cmake b/config.h.cmake
    index 3a7b76b..93a781c 100644
    --- a/config.h.cmake
    +++ b/config.h.cmake
    @@ -435,6 +435,7 @@
     #cmakedefine DEFAULT_SECURE_FILE_PRIV_DIR @DEFAULT_SECURE_FILE_PRIV_DIR@
     #cmakedefine DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR @DEFAULT_SECURE_FILE_PRIV_EMBEDDED_DIR@
     #cmakedefine HAVE_LIBNUMA 1
    +#cmakedefine WITH_NUMA 1
     
     /* For default value of --early_plugin_load */
     #cmakedefine DEFAULT_EARLY_PLUGIN_LOAD @DEFAULT_EARLY_PLUGIN_LOAD@
    diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
    index 8794857..ea8e28d 100644
    --- a/storage/innobase/buf/buf0buf.cc
    +++ b/storage/innobase/buf/buf0buf.cc
    @@ -77,7 +77,7 @@ Created 11/5/1995 Heikki Tuuri
     #include <map>
     #include <sstream>
     
    -#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA)
    +#if defined(HAVE_LIBNUMA) && defined(WITH_NUMA) && !defined(UNIV_INNOCHECKSUM)
     #include <numa.h>
     #include <numaif.h>
[31 May 2016 5:28] Shahriyar Rzayev
Same on CentOS 7 with 5.7.12.
According to:
http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_numa_interleav...
"For the innodb_numa_interleave option to be available, MySQL must be compiled on a NUMA-enabled system"

So it seems to be available packages are not build on NUMA-enabled system?
[3 Jun 2016 2:18] tsubasa tanaka
MySQL 5.7.13 still has this bug.
I can't find innodb_numa_interleave even I compiled with WITH_NUMA=ON from source-tarball.
[11 Jun 2016 8:52] Saverio M
Percona Server 5.7.12 has recently been released, which contains the fix for it.
[18 Jul 2016 4:49] Laurynas Biveinis
Bug 82029 fix

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug82029.patch (application/octet-stream, text), 1.27 KiB.

[18 Jul 2016 4:50] Laurynas Biveinis
Patch author Tomislav Plavcic
[19 Aug 2016 2:23] Paul Dubois
Posted by developer:
 
Noted in 5.7.16, 8.0.1 changelogs.

The innodb_numa_interleave system variable was erroneously available
on some systems that were not NUMA-enabled. Thanks to Tomislav
Plavcic for the patch.
[28 Sep 2016 14:49] Paul Dubois
Posted by developer:
 
Noted in 5.7.17 (not 5.7.16) changelog.