【发布时间】:2015-06-10 01:17:10
【问题描述】:
我们尝试为使用 galera 集群运行的 mariabdb 设置大页面。我们已经分配了足够高的大页面来容纳 innodb 缓冲区。
server.conf
[mysqld]
large-pages
innodb_buffer_pool_size =4G
/etc/sysctl.conf
# hugepages information
vm.nr_hugepages = 3072
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
/etc/security/limits.conf
@mysql soft memlock unlimited
@mysql hard memlock unlimited
免费的-m
total used free shared buffers cached
Mem: 11908 11635 272 0 68 5502
-/+ buffers/cache: 6064 5843
Swap: 2559 0 2559
mysqld.log 中的错误
150403 4:46:12 [Note] InnoDB: Initializing buffer pool, size = 4.0G
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
InnoDB: HugeTLB: Warning: Failed to allocate 687865856 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
150403 4:46:13 [Note] InnoDB: Completed initialization of buffer pool
cat /proc/meminfo |grep -i 巨大
AnonHugePages: 0 kB
HugePages_Total: 3072
HugePages_Free: 3072
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
【问题讨论】:
-
试过这个页面底部的脚本来计算你的内存需求? dev.mysql.com/doc/refman/5.6/en/large-page-support.html
-
你有多少内存可用?
-
@NorbertvanNobelen 当我尝试脚本时,我得到 (standard_in) 2: syntax error
标签: mysql centos6 galera huge-pages