MySQL 内存使用情况(InnoDB、Win)
MySQL memory usage (InnoDB, Win)
我在 1Gb 的 Win 2008 服务器上安装了 MySQL 5.6 (InnoDB)。 mysqld 使用 415Mb 内存。如何减少内存使用?我读到可以通过配置 my.ini: key_buffer_size
、innodb_buffer_pool_size
等来实现。请告诉我正确的设置以最小化内存使用量。
你可以查看Configuring MySQL to use minimal memory:
# /etc/my.cnf:
innodb_buffer_pool_size=5M
innodb_log_buffer_size=256K
query_cache_size=0
max_connections=10
key_buffer_size=8
thread_cache_size=0
host_cache_size=0
innodb_ft_cache_size=1600000
innodb_ft_total_cache_size=32000000
# per thread or per operation settings
thread_stack=131072
sort_buffer_size=32K
read_buffer_size=8200
read_rnd_buffer_size=8200
max_heap_table_size=16K
tmp_table_size=1K
bulk_insert_buffer_size=0
join_buffer_size=128
net_buffer_length=1K
innodb_sort_buffer_size=64K
#settings that relate to the binary log (if enabled)
binlog_cache_size=4K
binlog_stmt_cache_size=4K
我在 1Gb 的 Win 2008 服务器上安装了 MySQL 5.6 (InnoDB)。 mysqld 使用 415Mb 内存。如何减少内存使用?我读到可以通过配置 my.ini: key_buffer_size
、innodb_buffer_pool_size
等来实现。请告诉我正确的设置以最小化内存使用量。
你可以查看Configuring MySQL to use minimal memory:
# /etc/my.cnf:
innodb_buffer_pool_size=5M
innodb_log_buffer_size=256K
query_cache_size=0
max_connections=10
key_buffer_size=8
thread_cache_size=0
host_cache_size=0
innodb_ft_cache_size=1600000
innodb_ft_total_cache_size=32000000
# per thread or per operation settings
thread_stack=131072
sort_buffer_size=32K
read_buffer_size=8200
read_rnd_buffer_size=8200
max_heap_table_size=16K
tmp_table_size=1K
bulk_insert_buffer_size=0
join_buffer_size=128
net_buffer_length=1K
innodb_sort_buffer_size=64K
#settings that relate to the binary log (if enabled)
binlog_cache_size=4K
binlog_stmt_cache_size=4K