2014年(10)
分类: Mysql/postgreSQL
2014-01-24 17:00:14
点击(此处)折叠或打开
# Each page is normally 2MB, so a value of 20 = 40MB. # This command actually allocates memory, so this much # memory must be available. echo 20 > /proc/sys/vm/nr_hugepages
# Set the group number that is permitted to access this # memory (102 in this case). The mysql user must be a # member of this group. echo 102 > /proc/sys/vm/hugetlb_shm_group4:增加shmem
# Increase the amount of shmem permitted per segment # (12G in this case). echo 1560281088 > /proc/sys/kernel/shmmax5增加 shmall
# Increase total amount of shared memory. The value # is the number of pages. At 4KB/page, 4194304 = 16GB. echo 4194304 > /proc/sys/kernel/shmall
mysql官方建议 shmem 和shmmax 尽量接近以上内容来自MYSql 官方文档http://dev.mysql.com/doc/refman/5.5/en/large-page-support.html