On Thu, Oct 03, 2013 at 10:41:41AM -0700, Kir Kolyshkin wrote: > As you can see, there are both ram (physpages) and swap fails. > There is nothing wrong with the current behaviour -- if all RAM > and swap is gone, there is absolutely no other way than to kill > some process. > > So OOM killer configuration won't help here, you need to either > decrease mysql appetites (/etc/my.cnf) or increase RAM or swap. > Apparently my.cfg is not configured for a system with 2G of RAM > (if you can show my.cnf we can see where it needs to be tuned), > and this is the source of the problem and this is what needs to be > fixed. It would be the same way on a real physical server, i.e. > the problem is orthogonal to OpenVZ. > > But the easiest way would be to increase swap for this container, > and then check if swap failcounter is not increasing. If there will > be enough ram+swap, there will be no OOM kills. >
I'll look into increasing the swap on this one and see if it helps. Here is the my.cnf file (comments stripped out) thats used in the cpanel VM's (and yes I could be missing a memory setting some where) some of the settings we set for prestashop usability: [mysqld] port = 3306 socket = /tmp/mysql.sock key_buffer = 64M max_allowed_packet = 32M bulk_insert_buffer_size = 64M table_open_cache = 32768 open_files_limit = 65536 sort_buffer_size = 8M read_buffer_size = 2M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G myisam_repair_threads = 2 thread_cache = 8 myisam_recover query_cache_size= 256M query_cache_limit = 2M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 16 max_connections = 100 #max_user_connections = 40 max_delayed_threads = 0 log-error = /var/log/mysql.error.log log-warnings ft_min_word_len = 3 wait_timeout = 300 tmp_table_size = 512M max_heap_table_size = 512M table_definition_cache = 12000 join_buffer_size = 256K userstat = 1 server-id = 1 innodb_data_home_dir = /var/lib/mysql/ innodb_log_group_home_dir = /var/lib/mysql/ innodb_buffer_pool_size = 64M innodb_additional_mem_pool_size = 10M innodb_log_file_size = 128M innodb_log_buffer_size = 8M innodb_log_files_in_group = 3 innodb_file_io_threads = 4 innodb_thread_concurrency = 4 innodb_max_dirty_pages_pct = 90 innodb_file_per_table = 1 [mysqldump] quick max_allowed_packet = 32M [mysql] no-auto-rehash [isamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysqld_safe] open-files-limit = 8192 > _______________________________________________ > Users mailing list > [email protected] > https://lists.openvz.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] https://lists.openvz.org/mailman/listinfo/users
