MySQL 5.1 y la memoria se paginan lentamente. con gráfico

We are on a RHEL 5.4 64 bit , 16 GB RAM 6x AMD Opteron.

So we have been experiencing this issue:

http://imgur.com/LMHi4

As you can see, the swap/paging starts to slowly creep up. Eventually this causes a problem. That large dip is when Mysqld was restarted. There is nothing else running on this system.

Mainly using Innodb with the following config;

key_buffer      = 512M
max_allowed_packet  = 128M
thread_stack        = 192K
thread_cache_size       = 8
table_cache            = 812
thread_concurrency     = 10

query_cache_limit       = 4M
query_cache_size        = 512M
join_buffer_size        = 512K

innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 10G
innodb_file_io_threads = 4
innodb_thread_concurrency = 12
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 8M
innodb_log_file_size = 512M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

I have heard a lot about turning off "swappiness" or setting it to '10'. But wouldn't that just call up an OOM and kill mysql? why is this happening?

preguntado el 31 de enero de 12 a las 16:01

Problem? How so? MySQL's memory usage should grow up slowly as it fills/populates caches, but it should never exceed the max allowed memory set in the php.ini file. -

Also, this belongs on ServerFault. -

Marc, this is a standalone DB server with no PHP, webserver, etc. -

1 Respuestas

Just to answer my own question after 1+ years after the fact. This is from experience. MySQL has a tendency to swap, slowly. Especially if it's configured to use up all necessary memory.

In this case I simply both lowered the buffer_pool_size to a bit lower than recomended on the documents (<80% of physical memory) also changed the swappiness to 10. Setting it to 10 would not cause an OOM as the system would still use the swap when needed just not so aggressively.

contestado el 15 de mayo de 13 a las 04:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.