process wakeups

Steve Grubb sgrubb at redhat.com
Tue Jul 15 15:28:59 UTC 2008


On Tuesday 15 July 2008 11:15:56 Bill Crawford wrote:
> > One of the worst that I've found that's not on the list is mysqld. It has
> > 2 threads that just never stop.
>
> I see about 1 wakeup per second from mysqld (it's currently idle,
> though). What are you seeing there?

ps -ef | grep sql
root      2227     1  0 07:41 ?        
00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid
mysql     2286  2227  0 07:41 ?        
00:00:12 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock

ls /proc/2286/task/
2286  2296  2297  2298  2299  2301  2304  2308  2309  2312  2460

then strace them.

strace -p 2301
Process 2301 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 78000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}^C <unfinished ...>

...this is after about 5 seconds. This thread just never gets quiet and is 
constantly churning. My system is idle too with nothing being added or 
deleted or read from the database.

strace -p 2304
Process 2304 attached - interrupt to quit
select(0, NULL, NULL, NULL, {0, 101000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {2, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {2, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {2, 0}^C <unfinished ...>

Those are the 2 noisy threads.

-Steve




More information about the fedora-devel-list mailing list