Bug #113713 Allow Failure of Server Startup when large-pages fails.
Submitted: 22 Jan 2024 19:36 Modified: 23 Jan 2024 11:26
Reporter: John Anderson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:8 OS:Any
Assigned to: CPU Architecture:Any

[22 Jan 2024 19:36] John Anderson
Description:
Currently, when large-pages is present in the my.cnf, but is not setup on the system or the OS configuration is sized to small, the server nearly silently falls back to using regular pages.

This creates a problem for very large InnoDB Buffer Pool sizes.  The process on the system's side to set up HugeTLB allocates a large chunk of RAM.   Then the MySQL process very nearly silently doesn't use this RAM.  Now you have the system setting aside a large chunk of RAM for HugeTLB, and MySQL allocating a large chunk of conventional memory for the actual buffer pool.

This is not ideal, as it reduces the overall availability of system memory.

For the sake of backward compatability, can we add a large-pages-required flag to my.cnf?

The basic logic would be if 'large-pages' is set, and if 'large-pages-required' is set, then server_exit if large_page_aligned_alloc fails.  That way, admins don't have to check for an obscure log file message if they want to ensure that HugeTLB is indeed working.

How to repeat:
You can repeat the initial set of conditions by defining a vm.nr_hugepages to be smaller than innodb_buffer_pool_size, then ensuring large-pages in the my.cnf and then starting mysql.

Suggested fix:
Add a large-pages-required directive to my.cnf that will prevent server startup when large-pages is desired, but not attainable.
[23 Jan 2024 11:26] MySQL Verification Team
Hi Mr. Anderson,

Thank you for your bug report.

Currently, we are not able to repeat the problem that you are reporting.

We need a fully repeatable test case, with the proof that pages of the size that are larger then 4 Kb are used and then that those pages are reverting back to 4K.

We simply need a fully repeatable test case, with a proof that large pages were used and then stopped being used.

You should also provide us with all the output from these commands:

https://dev.mysql.com/doc/refman/8.0/en/large-page-support.html

Right now, we can not proceed without all the feedback that we require.

Also, please use release 8.0.36. Last , but not least, you said nothing about the details of the operating system, kernel version, glibc version etc .....

Many thanks in advance.