Good idea! I set up this little loop in my bash shell to poll every second:
while (true) ; do ps axl | sed -n -e 1p -e /mysqld/p; sleep 1; done
Then I tried to replicate those slow queries and after a few minutes of trying, I
got the slow query, but didn't see anything from the loop above. I thought maybe I
just missed it, so I got the slow query to happen again, but still nothing from the
ps loop. So perhaps it's not an I/O wait problem....
I also tried replicating the problem while running a similar loop showing SHOW
PROCESSLIST, but I wasn't able to catch it in the act even after a dozen attempts.
Thanks for the suggestion though.
--- Dan Nelson <dnelson@stripped> wrote:
> In the last episode (May 23), LS said:
> > Thanks for the response! Sorry, I should have put more info in there
> > in the first place. The select and update queries you see below are
> > operating on two different databases, and the lock times are 0:
> >
> > # Time: 030523 17:34:28
> > # User@Host: scott[tiger] @ [a.b.c.d]
> > # Query_time: 23 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
> > update my_big_table set some_flag='Y';
> > # User@Host: scott[tiger] @ [a.b.c.d]
> > # Query_time: 2 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
> > use other_db;
> > insert into status (hostname, snapshotTimestamp, m1, m2, total) values
> > ('host1','2003-05-23 17:34:26',252049128,1555431424,1782);
> >
> > The update takes a while to churn through, which is normal. The
> > insert takes 2 seconds to be processed, which is the unusual part.
>
> Hm. that is odd. If you can catch it in the act, what's the output of
> "ps axl | sed -n -e 1p -e /mysqld/p" when this happens? I'm interested
> in the WCHAN column. A thread truly waiting on I/O will probably be in
> the "biord" state. There might be something else causing that thread
> to slow down (I've never used a FreeBSD system with more than 1GB of
> RAM).
>
> --
> Dan Nelson
> dnelson@stripped
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Thread |
---|
• Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | LS | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Dan Nelson | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | LS | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Dan Nelson | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | colbey | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | LS | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Dan Nelson | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Egor Egorov | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Dan Nelson | 24 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | Jeremy Zawodny | 25 May |
• Re: Slow queries on 4.0.13, FreeBSD 4.8 STABLE, linuxthreads, zawodny blog | LS | 25 May |