[MySQL FAQ]系列 -- 64位系统下也报内存分配不能超过2G?
2008-08-29 14:29
267 查看
作/译者:叶金荣(Email:
![](http://www.imysql.cn/files/pictures/email.gif)
),来源:http://imysql.cn,转载请注明作/译者和出处,并且不能用于商业用途,违者必究。
明明是64位系统下,有16G内存,启动mysqld时指定 innodb_buffer_pool_size 为12G,却报一下错误:
是不是很奇怪呢?
根据错误提示的内容,google一下,发现是内核限制的缘故:
修改一下内核限制:
然后重启mysql,一切正常了。
另外,还需要关注一下配置文件 /etc/security/limits.conf 里的内容。
本文出自 “MySQL中文网”博客 http://www.imysql.cn/本文出自 “爱MySQL” 博客,转载请与作者联系!
![](http://www.imysql.cn/files/pictures/email.gif)
),来源:http://imysql.cn,转载请注明作/译者和出处,并且不能用于商业用途,违者必究。
明明是64位系统下,有16G内存,启动mysqld时指定 innodb_buffer_pool_size 为12G,却报一下错误:
080829 14:15:14 mysqld started InnoDB: HugeTLB: Warning: Failed to allocate 12884918272 bytes. errno 22 InnoDB HugeTLB: Warning: Using conventional memory pool 080829 14:15:14 InnoDB: Error: cannot allocate 12884918272 bytes of InnoDB: memory with malloc! Total allocated memory InnoDB: by InnoDB 44607312 bytes. Operating system errno: 12 InnoDB: Check if you should increase the swap file or InnoDB: ulimits of your operating system. InnoDB: On FreeBSD check you have compiled the OS with InnoDB: a big enough maximum process size. InnoDB: Note that in most 32-bit computers the process InnoDB: memory space is limited to 2 GB or 4 GB. InnoDB: We keep retrying the allocation for 60 seconds... InnoDB: Fatal error: cannot allocate the memory for the buffer pool Warning: Failed to allocate 29360128 bytes from HugeTLB memory. errno 12 Warning: Using conventional memory pool 080829 14:16:14 [Note] /usr/local/mysql/bin/mysqld: ready for connections. Version: '5.0.45-log' socket: '/home/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
是不是很奇怪呢?
根据错误提示的内容,google一下,发现是内核限制的缘故:
[root@yejr mysql]# cat /proc/sys/vm/nr_hugepages 6000
修改一下内核限制:
[root@yejr mysql]# echo 0 > /proc/sys/vm/nr_hugepages
然后重启mysql,一切正常了。
另外,还需要关注一下配置文件 /etc/security/limits.conf 里的内容。
本文出自 “MySQL中文网”博客 http://www.imysql.cn/本文出自 “爱MySQL” 博客,转载请与作者联系!
相关文章推荐
- [MySQL FAQ]系列 -- 64位系统下也报内存分配不能超过2G?
- [MySQL FAQ]系列 -- mysql如何调用系统外部程序
- foxmail的in.box作为一个普通文件在fat32的文件系统上不能超过2G
- [MySQL FAQ]系列 -- mysql如何调用系统外部程序
- [MySQL FAQ]系列 — 怎么计算打开文件数
- [MySQL FAQ]系列 -- php无法连接mysql
- Windows下mysql5.7.9解压缩版正确安装步骤,解决win10等windows系统不能启动mysql服务
- [MySQL FAQ]系列 — 为什么InnoDB表要建议用自增列做主键
- MySQL数据库系列之Centos6.5系统下RPM包安装MySQL5.6
- 关于mac原生系列设备【Mac mini、iMac、MB】,系统启动时键盘、鼠标均不能使用的解决方案
- [MySQL FAQ]系列 -- Too many open files
- [MySQL FAQ]系列 -- php无法连接mysql
- [MySQL FAQ]系列 -- 如何为一个字段指定字符集
- [MySQL FAQ]系列 -- Linux命令行下快速监控mysql
- [MySQL FAQ]系列 — MySQL无法启动例一
- [MySQL FAQ]系列 -- 写给新手:学会找到问题所在
- ASUS A55V系列笔记本安装系统出现磁盘是gpt格式,不能安装系统的解决方案。
- [MySQL FAQ]系列 -- InnoDB报错,buffer不够用
- [MySQL FAQ]系列 -- 新手必看:一步到位之InnoDB
- 64位Win10系统安装Mysql5.7.11的方法(案例详解)