I've set up Hugepages, but i'm not seeing any of them reserved. Have I missed a step, or for some particular reason, is MySQL is unable to utilize the Hugepages? I have not created a mount of hugetlbfs, although from what I read, MySQL would not call pages in such a manner. If I'm wrong, please let me know, as that would be a trivial solution. Almost all my MySQL tables are using InnoDB.

NOTE: I created a hugetlbfs, no change as expected. Is it possible that rebooting would rectify this situation? I would not want to go through the procedure, as this is high availability, but would do so if necessary.

This is the configurations, which I believe are relevant.


## Huge Pages
vm.nr_hugepages = 4096
vm.hugetlb_shm_group = 27

## SHM
kernel.shmmax = 34359738368
kernel.shmall = 8589934592


mysql             soft    nofile          12888
mysql             hard    nofile          51552
@mysql            soft    memlock         unlimited
@mysql            hard    memlock         unlimited



grep Huge /proc/meminfo

HugePages_Total:  4096
HugePages_Free:   4096
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

id mysql

uid=27(mysql) gid=27(mysql) groups=27(mysql) context=root:system_r:unconfined_t:SystemLow-SystemHigh

tail -6 /var/log/mysqld.log

InnoDB: HugeTLB: Warning: Failed to allocate 1342193664 bytes. errno 12
InnoDB HugeTLB: Warning: Using conventional memory pool
120808 15:49:25  InnoDB: Started; log sequence number 0 1729804158
120808 15:49:25 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.95'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

I would really appreciate any help, I'm completely out of ideas. If I missed any more relevant configs, or diagnostics, please comment and I'll add it to the question.


Can you edit /etc/init.d/mysqld, add following under prog="MySQL" restart mysql and see if the issue persists?

ulimit -l unlimited

I suspect you are hitting following bug.


  • Thank you for providing that bug report link, it explains my situation exactly. I've finally got Hugepages working!!! – J. M. Becker Oct 5 '12 at 18:31

Can you add this line

ulimit -l unlimited 

after the line 'prog="MySQL"' in /etc/init.d/mysqld start up script and restarting the service.

This is a bug in CentOS 5 and should be fixed in Centos 6.

Please confirm whether this works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.