Hugepages not utilized by MySQL 5.0, CentOS 5

Posted by TechZilla on Server Fault See other posts from Server Fault or by TechZilla
Published on 2012-08-08T15:23:05Z Indexed on 2012/10/05 15:41 UTC
Read the original article Hit count: 284

Filed under:
|
|

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.

/etc/sysctl.conf

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

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

/etc/security/limits.conf

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

/etc/my.cnf

[mysqld]
large-pages
...

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.

© Server Fault or respective owner

Related posts about linux

Related posts about mysql