Bug#672675: mysql-server-core-5.5: frequent wake-ups while idle
Package: mysql-server-core-5.5 Version: 5.5.23-2 Severity: normal The MySQL server wakes up several times per second even if no clients are connected. Waking up the CPU unnecessarily results in increased power consumption. Please consider allowing mysqld to sleep until it has queries to process. Here is the result of tracing all threads of idle mysqld for 4 seconds: # for i in /proc/$(pidof mysqld)/task/*; do timeout -s INT 4 strace -p $(basename $i); done Process 11711 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...> Process 11711 detached Process 11731 attached - interrupt to quit io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, Process 11731 detached Process 11732 attached - interrupt to quit io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, Process 11732 detached Process 11733 attached - interrupt to quit io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, Process 11733 detached Process 11734 attached - interrupt to quit io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, Process 11734 detached Process 11735 attached - interrupt to quit io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, Process 11735 detached Process 11736 attached - interrupt to quit io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, Process 11736 detached Process 11737 attached - interrupt to quit io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, Process 11737 detached Process 11738 attached - interrupt to quit io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, Process 11738 detached Process 11739 attached - interrupt to quit io_getevents(-202637312, 1, 256, {}{0, 5}) = 0 io_getevents(-202637312, 1, 256, {}{0, 5}) = 0 io_getevents(-202637312, 1, 256, {}{0, 5}) = 0 io_getevents(-202637312, 1, 256, {}{0, 5}) = 0 io_getevents(-202637312, 1, 256, {}{0, 50
Bug#672675: [debian-mysql] Bug#672675: mysql-server-core-5.5: frequent wake-ups while idle
Piotr, As described in http://dev.mysql.com/doc/innodb/1.1/en/innodb-performance-aio-linux.html, you can set "innodb_use_native_aio=0" in the [mysqld] section of the config file. I hope this helps. I'll put your question up on the FAQ (http://wiki.debian.org/Teams/MySQL/FAQ) and close the report if you have no other issues. On 12/05/12 19:54, Piotr Engelking wrote: Package: mysql-server-core-5.5 Version: 5.5.23-2 Severity: normal The MySQL server wakes up several times per second even if no clients are connected. Waking up the CPU unnecessarily results in increased power consumption. Please consider allowing mysqld to sleep until it has queries to process. Here is the result of tracing all threads of idle mysqld for 4 seconds: # for i in /proc/$(pidof mysqld)/task/*; do timeout -s INT 4 strace -p $(basename $i); done Process 11711 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...> Process 11711 detached Process 11731 attached - interrupt to quit io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, {}{0, 5}) = 0 io_getevents(-202268672, 1, 256, Process 11731 detached Process 11732 attached - interrupt to quit io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, {}{0, 5}) = 0 io_getevents(-202280960, 1, 256, Process 11732 detached Process 11733 attached - interrupt to quit io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, {}{0, 5}) = 0 io_getevents(-202428416, 1, 256, Process 11733 detached Process 11734 attached - interrupt to quit io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, {}{0, 5}) = 0 io_getevents(-202440704, 1, 256, Process 11734 detached Process 11735 attached - interrupt to quit io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, {}{0, 5}) = 0 io_getevents(-202452992, 1, 256, Process 11735 detached Process 11736 attached - interrupt to quit io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, {}{0, 5}) = 0 io_getevents(-202465280, 1, 256, Process 11736 detached Process 11737 attached - interrupt to quit io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, {}{0, 5}) = 0 io_getevents(-202612736, 1, 256, Process 11737 detached Process 11738 attached - interrupt to quit io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) = 0 io_getevents(-202625024, 1, 256, {}{0, 5}) =