Bug 427597 - Can no longer use large pages for InnoDB buffer pool
Can no longer use large pages for InnoDB buffer pool
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-04 20:42 EST by Andrig Miller
Modified: 2008-01-07 18:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-07 18:08:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrig Miller 2008-01-04 20:42:57 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:

HugePages_Total:  3072
HugePages_Free:   3072
HugePages_Rsvd:      0
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):


How reproducible:

Every time.

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
Actual results:

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

Expected results:

It should startup without the errno 12 lines, as it was before, with no problems.

Additional info:

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.
Comment 1 Tom Lane 2008-01-04 22:47:56 EST
Sounds more likely to be a kernel issue than anything else.
Comment 2 Andrig Miller 2008-01-07 17:33:33 EST
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.
Comment 3 Andrig Miller 2008-01-07 18:08:22 EST
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.

Note You need to log in before you can comment on or make changes to this bug.