Remove unneeded check of variable to allow mysqld_safe support --numa-interleave

Description

MySQL Percona Server :

5.7.26-29-log Percona Server (GPL), Release 29, Revision 11ad961

use mysqld_safe --help

 

 

When I add --numa-interleave into mysql  shell script:

 

$exec --numa-interleave \ # add there --datadir="$datadir" --socket="$socketfile" \ --pid-file="$mypidfile" \ --basedir=/usr --user=mysql $extra_opts >/dev/null 2>&1 & safe_pid=$!

 

 

start mysql

 

/etc/init.d/mysql start

start fail, error log:

2019-10-10T09:52:38.051540+08:00 0 [ERROR] unknown option '--numa-interleave'
2019-10-10T09:52:38.051549+08:00 0 [ERROR] Aborting

 

 

mysqld_safe does not support --numa-interleave option?

 

 

 

Environment

None

Attachments

1
  • 10 Oct 2019, 03:53 AM

Smart Checklist

Activity

Show:

Jira Bot July 10, 2020 at 2:55 PM

To: Former user
CC:

Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from
Percona has made an edit to the Summary field of an issue that you reported.

I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed
a few words, or completely rewrote the text. In any case, it is Percona Engineering's
intention to make the Summary and Description of an issue as accurate as possible
so that we're fixing the actual problem you're encountering, and to avoid
misunderstandings about symptoms and causes.

If the current Summary does not accurately reflect the problem you are reporting,
or if you feel the change was otherwise inappropriate in some way, please add a
new comment explaining things and we'll address it as soon as we can.

This message will be added only once per issue, regardless of how many times
the Summary is edited.

message-code:summary-edited

illia.pshonkin June 10, 2020 at 3:28 PM

Both RPM and binary packages have cmake's -DWITH_NUMA flag:

[root@compile-cent-7 debug]# 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 HAVE_NUMA_H:INTERNAL=1

But mysqld_safe exposes --numa-interleave flag as mysqld flag which correct is --innodb-numa-interleave

Run with --numa-interleave flag and on latest release:

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.30-33Copyright (c) 2009-2020 Percona LLC and/or its affiliates Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show variables like 'innodb_numa_interleave'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_numa_interleave | ON | +------------------------+-------+ 1 row in set (0.00 sec)

And without:

mysql> show variables like 'innodb_numa_interleave'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_numa_interleave | OFF | +------------------------+-------+ 1 row in set (0.01 sec)

Building with 5.7.27-30 source tarball:

//Explicitly set NUMA memory allocation policy WITH_NUMA:BOOL=ON //Test HAVE_LIBNUMA HAVE_LIBNUMA:INTERNAL=1 HAVE_NUMAIF_H:INTERNAL=1 HAVE_NUMA_H:INTERNAL=1

And variable lookup test:

Server version: 5.7.27-30Copyright (c) 2009-2019 Percona LLC and/or its affiliates Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show variables like 'innodb_numa_interleave'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_numa_interleave | OFF | +------------------------+-------+ 1 row in set (0.01 sec)

Lalit Choudhary October 11, 2019 at 1:02 PM

Hi

Thank you for the report.

 

Test: ps 5.7.27

For percona server binary build innodb_numa_interleave option missing.

 

mysql > show variables like 'innodb_numa_interleave'; Empty set (0.02 sec)

 

 

[mysqld]

innodb_numa_interleave=on

 

2019-10-11T12:57:02.684492Z 0 [ERROR] unknown variable 'innodb_numa_interleave=on' 2019-10-11T12:57:02.684528Z 0 [ERROR] Aborting

 

Whereas for the rpm package it is available. 

 

mysql> show variables like 'innodb_numa_interleave'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_numa_interleave | OFF | +------------------------+-------+ 1 row in set (0.01 sec)

 

[mysqld]

innodb_numa_interleave=on

 

2019-10-11T12:54:03.736664Z 0 [Note] InnoDB: Setting NUMA memory policy to MPOL_INTERLEAVE 2019-10-11T12:54:03.831309Z 0 [Note] InnoDB: Setting NUMA memory policy to MPOL_DEFAULT mysql> show variables like 'innodb_numa_interleave'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | innodb_numa_interleave | ON | +------------------------+-------+ 1 row in set (0.01 sec)

 

 

Glenn Keh October 10, 2019 at 4:12 AM

mysqld_safe script:

... # Initialize script globals KILL_MYSQLD=1; MYSQLD= niceness=0 mysqld_ld_preload= mysqld_ld_library_path= load_jemalloc=1 load_hotbackup=0 flush_caches=0 numa_interleave= ... Usage: $0 [OPTIONS] The following options may be given as the first argument: --no-defaults Don't read the system defaults file --defaults-file=FILE Use the specified defaults file --defaults-extra-file=FILE Also use defaults from the specified file Other options: --ledir=DIRECTORY Look for mysqld in the specified directory --open-files-limit=LIMIT Limit the number of open files --core-file-size=LIMIT Limit core files to the specified size --timezone=TZ Set the system timezone --malloc-lib=LIB Preload shared library LIB if available --mysqld=FILE Use the specified file as mysqld --mysqld-version=VERSION Use "mysqld-VERSION" as mysqld --nice=NICE Set the scheduling priority of mysqld --plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if VERSION is given --skip-kill-mysqld Don't try to kill stray mysqld processes --syslog Log messages to syslog with 'logger' --skip-syslog Log messages to error log (default) --syslog-tag=TAG Pass -t "mysqld-TAG" to 'logger' --flush-caches Flush and purge buffers/caches before starting the server --numa-interleave Run mysqld with its memory interleaved on all NUMA nodes ... if test -n "$numa_interleave" then append_arg_to_args "--innodb-numa-interleave=1" fi ...

Glenn Keh October 10, 2019 at 3:59 AM

exec = mysqld_safe

Done

Details

Assignee

Reporter

Needs QA

Yes

Time tracking

1d logged

Components

Fix versions

Affects versions

Priority

Smart Checklist

Created October 10, 2019 at 3:55 AM
Updated March 6, 2024 at 11:49 AM
Resolved August 24, 2020 at 2:49 PM

Flag notifications