[debian-mysql] Bug#672675: mysql-server-core-5.5: frequent wake-ups while idle

Piotr Engelking inkerman42 at gmail.com
Sat May 12 18:54:55 UTC 2012


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 ...> <unfinished ...>
Process 11711 detached
Process 11731 attached - interrupt to quit
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202268672, 1, 256,  <unfinished ...>
Process 11731 detached
Process 11732 attached - interrupt to quit
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202280960, 1, 256,  <unfinished ...>
Process 11732 detached
Process 11733 attached - interrupt to quit
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202428416, 1, 256,  <unfinished ...>
Process 11733 detached
Process 11734 attached - interrupt to quit
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202440704, 1, 256,  <unfinished ...>
Process 11734 detached
Process 11735 attached - interrupt to quit
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202452992, 1, 256,  <unfinished ...>
Process 11735 detached
Process 11736 attached - interrupt to quit
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202465280, 1, 256,  <unfinished ...>
Process 11736 detached
Process 11737 attached - interrupt to quit
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202612736, 1, 256,  <unfinished ...>
Process 11737 detached
Process 11738 attached - interrupt to quit
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202625024, 1, 256,  <unfinished ...>
Process 11738 detached
Process 11739 attached - interrupt to quit
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202637312, 1, 256,  <unfinished ...>
Process 11739 detached
Process 11740 attached - interrupt to quit
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256, {}{0, 500000000}) = 0
io_getevents(-202649600, 1, 256,  <unfinished ...>
Process 11740 detached
Process 11742 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = -1 ETIMEDOUT
(Connection timed out)
futex(0xf7fee5f0, FUTEX_WAKE_PRIVATE, 1) = 0
gettimeofday({1336846019, 586801}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846019, 586944765}) = 0
futex(0xf7fee618, FUTEX_WAIT_PRIVATE, 505, {0, 999856235}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee5f0, FUTEX_WAKE_PRIVATE, 1) = 0
gettimeofday({1336846020, 587593}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846020, 587759623}) = 0
futex(0xf7fee618, FUTEX_WAIT_PRIVATE, 507, {0, 999833377}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee5f0, FUTEX_WAKE_PRIVATE, 1) = 0
gettimeofday({1336846021, 588515}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846021, 588691875}) = 0
futex(0xf7fee618, FUTEX_WAIT_PRIVATE, 509, {0, 999823125}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee5f0, FUTEX_WAKE_PRIVATE, 1) = 0
gettimeofday({1336846022, 589312}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846022, 589488639}) = 0
futex(0xf7fee618, FUTEX_WAIT_PRIVATE, 511, {0, 999823361} <unfinished ...>
Process 11742 detached
Process 11743 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = -1 ETIMEDOUT
(Connection timed out)
futex(0xf7fee590, FUTEX_WAKE_PRIVATE, 1) = 0
time(NULL)                              = 1336846023
gettimeofday({1336846023, 667902}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846023, 668036084}) = 0
futex(0xf7fee5b8, FUTEX_WAIT_PRIVATE, 513, {0, 999865916}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee590, FUTEX_WAKE_PRIVATE, 1) = 0
time(NULL)                              = 1336846024
gettimeofday({1336846024, 669045}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846024, 669187950}) = 0
futex(0xf7fee5b8, FUTEX_WAIT_PRIVATE, 515, {0, 999857050}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee590, FUTEX_WAKE_PRIVATE, 1) = 0
time(NULL)                              = 1336846025
gettimeofday({1336846025, 669988}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846025, 670071788}) = 0
futex(0xf7fee5b8, FUTEX_WAIT_PRIVATE, 517, {0, 999916212}) = -1
ETIMEDOUT (Connection timed out)
futex(0xf7fee590, FUTEX_WAKE_PRIVATE, 1) = 0
time(NULL)                              = 1336846026
gettimeofday({1336846026, 671174}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846026, 671318058}) = 0
futex(0xf7fee5b8, FUTEX_WAIT_PRIVATE, 519, {0, 999855942} <unfinished ...>
Process 11743 detached
Process 11744 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = -1 ETIMEDOUT
(Connection timed out)
futex(0xf7fee650, FUTEX_WAKE_PRIVATE, 1) = 0
time(NULL)                              = 1336846027
time(NULL)                              = 1336846027
gettimeofday({1336846027, 523539}, NULL) = 0
clock_gettime(CLOCK_REALTIME, {1336846027, 523729853}) = 0
futex(0xf7fee678, FUTEX_WAIT_PRIVATE, 105, {4, 999809147} <unfinished ...>
Process 11744 detached
Process 11745 attached - interrupt to quit
futex(0xf7e199b8, FUTEX_WAIT_PRIVATE, 1, NULL <unfinished ...>
Process 11745 detached
Process 11746 attached - interrupt to quit
rt_sigtimedwait([HUP QUIT ALRM TERM TSTP], NULL, NULL, 8 <unfinished ...>
Process 11746 detached
#


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable'), (300, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.3.5 (SMP w/2 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mysql-server-core-5.5 depends on:
ii  libaio1      0.3.109-2
ii  libc6        2.13-32
ii  libgcc1      1:4.7.0-7
ii  libssl1.0.0  1.0.1b-1
ii  libstdc++6   4.7.0-7
ii  libwrap0     7.6.q-23
ii  zlib1g       1:1.2.6.dfsg-2

mysql-server-core-5.5 recommends no packages.

mysql-server-core-5.5 suggests no packages.

-- no debconf information





More information about the pkg-mysql-maint mailing list