Skip to content

innodb_numa_interleave=1, use numa numa_get_mems_allowed #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

innodb_numa_interleave=1, use numa numa_get_mems_allowed #138

wants to merge 1 commit into from

Conversation

grooverdan
Copy link

Using numa_all_nodes_ptr was excessively optimistic. Due to
constraints in systemd, containers or otherwise mysqld could of been
limited to a smaller set of cpus. Use the numa_get_mems_allowed
library function to see what we can interleave between before doing
so. This prevents repetitive errors "mbind: Invalid argument".

Using numa_all_nodes_ptr was excessively optimistic. Due to
constraints in systemd, containers or otherwise mysqld could of been
limited to a smaller set of cpus. Use the numa_get_mems_allowed
library function to see what we can interleave between before doing
so. This prevents repetative errors "mbind: Invalid argument".

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
@grooverdan
Copy link
Author

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

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=85932 for updates.
Thanks

gunnarku pushed a commit to facebook/mysql-8.0 that referenced this pull request Jul 21, 2017
Summary:
Prior to this the Avg_row_length column of the SHOW TABLE STATUS was always 0.  This diff adds the necessary code to calculate this value (Data_length / Rows).

Note I took a quick look at some of the other columns to see if there were obvious one that we should be implementing and didn't see any.

Issue mysql#138 (facebook/mysql-5.6#138)

Test Plan: MTR with updates to show valid Data_length and Avg_row_length values

Reviewers: yoshinorim, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52851
gunnarku pushed a commit to facebook/mysql-8.0 that referenced this pull request Jul 25, 2017
Summary:
Prior to this the Avg_row_length column of the SHOW TABLE STATUS was always 0.  This diff adds the necessary code to calculate this value (Data_length / Rows).

Note I took a quick look at some of the other columns to see if there were obvious one that we should be implementing and didn't see any.

Issue mysql#138 (facebook/mysql-5.6#138)

Test Plan: MTR with updates to show valid Data_length and Avg_row_length values

Reviewers: yoshinorim, hermanlee4

Reviewed By: hermanlee4

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D52851
@akopytov
Copy link

akopytov commented Sep 6, 2019

I wonder if this change was really necessary. I've been unsuccessfully trying to create a test case for this fix, and it looks like setting up the environment where this fix would make a difference is non-trivial.

At least with the modern kernel and libnuma, both numa_all_nodes_ptr and numa_get_mems_allowed() use the same source about the allowed memory nodes: the mems_allowed member of the current task's task_struct. The only difference between them is that numa_all_nodes_ptr is initialized once when the process is started by reading /proc/self/status (which reads task_struct::mems_allowed under the hood) , and numa_get_mems_allowed() gets the current set of allowed nodes via get_mempolicy(..., MPOL_F_MEMS_ALLOWED) (which, again, returns current->mems_allowed).

So the only case where this would matter is when a cpuset is changed to a different mems_allowed value between the moments when mysqld is started and the buffer pool is initialized/resized.

Does this fix target those specific cases, or I am missing something?

hustjieke pushed a commit to hustjieke/mysql-server that referenced this pull request Sep 4, 2024
* fix(shannon): remove warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants