Chinaunix首页 | 论坛 | 博客
  • 博客访问: 276362
  • 博文数量: 103
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 705
  • 用 户 组: 普通用户
  • 注册时间: 2013-05-02 16:15
文章分类

全部博文(103)

文章存档

2014年(8)

2013年(95)

我的朋友

分类: Mysql/postgreSQL

2013-09-03 16:21:38

原文地址:估算mysql使用内存公式 作者:xyaxlz

key_buffer_size + innodb_buffer_pool_size+max_connection*(sort_buffer_size+read_buffer_size+binlog_cache_size)+max_connection*2M
 
Warning

On 32-bit GNU/Linux x86, you must be careful not to set memory usage too high. glibc may permit the process heap to grow over thread stacks, which crashes your server. It is a risk if the value of the following expression is close to or exceeds 2GB:

innodb_buffer_pool_size + key_buffer_size + max_connections*(sort_buffer_size+read_buffer_size+binlog_cache_size) + max_connections*2MB

Each thread uses a stack (often 2MB, but only 256KB in MySQL binaries provided by Oracle Corporation.) and in the worst case also uses sort_buffer_size + read_buffer_size additional memory.

By compiling MySQL yourself, you can use up to 64GB of physical memory in 32-bit Windows. See the description for innodb_buffer_pool_awe_mem_mb in Section 13.2.3, “InnoDB Startup Options and System Variables”.

http://dev.mysql.com/doc/refman/5.5/en/innodb-configuration.html

阅读(1124) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~