I have a web server with Apacheand MySQLrunning on AWS EC2 t2.smallc Windows 2012 Server. AWS EC2 t2.smallcharacteristics:
- 2 GB RAM (65% used)
- 1 CPU 2.50 GHz (1% used)
Now the MySQL ( mysqld.exe) process uses 400 MB of RAM (too much for me).
Current current MySQL ( my.ini) settings :
key_buffer = 16M
max_allowed_packet = 16M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
tmp-table-size = 32M
max-heap-table-size = 32M
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 1024
table-open-cache = 2048
query_cache_type = 1
query_cache_limit = 256K
query_cache_min_res_unit = 2k
query_cache_size = 80M
innodb-log-files-in-group = 2
innodb-log-file-size = 64M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb_buffer_pool_size = 128M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
The database is formed by 20 InnoDB tables and consists of 5/10 columns. The server has low traffic.
How can I optimize my settings to match EC2 t2.small (2 GB RAM)?
source
share