Red Hat Bugzilla – Bug 427597
Can no longer use large pages for InnoDB buffer pool
Last modified: 2008-01-07 18:08:22 EST
Description of problem:
I have been using large page support for my InnoDB buffer pool for some time,
but it just stopped working, with an errno 12 (Out of Memory). MySQL is the
first server to come up after boot, and there are 3072 pages of free HugePages,
as reported in /proc/meminfo:
Hugepagesize: 2048 kB
This is 6GB out of the total of 8GB on the server, and there is 1.3GB still free
of conventional memory.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure large page (HugeTLB) for the OS
2. Set large-pages = true in /etc/my.cnf
3. Set InnoDB buffer pool to some value smaller than the HugeTLB
080104 18:33:00 mysqld started
InnoDB: HugeTLB: Warning: Failed to allocate 1610629120 bytes. errno 12
InnoDB HugeTLB: Warning: Using conventional memory pool
080104 18:33:01 InnoDB: Started; log sequence number 2 2748257126
Warning: Failed to allocate 8388608 bytes from HugeTLB memory. errno 12
Warning: Using conventional memory pool
It should startup without the errno 12 lines, as it was before, with no problems.
I have tried changing the size of the InnoDB buffer pool to smaller numbers, but
it doesn't seem to matter what the number is, it always fails trying to shmget
to the HugeTLB memory.
Sounds more likely to be a kernel issue than anything else.
I booted the older kernel I had on the system, and it stills fails the exact
same way, and also my Java Virtual Machine can successfully use the large pages
on the same system, so I don't think it is a kernel issue.
I will try to downgrade the MySQL database to the previous version, before the
last update, and see if that fixes the issue to isolate it even more.
Well, I finally figured out what was going on, and it was user error. I removed
the memlock soft and hard limits from /etc/security/limits.conf, even though the
database runs as the mysql user. I still have to figure out why I need that for
it to work, but needless to say, this can be close.
Sorry for the trouble.