Hello,

I've been fighting this problem for a while, and now it's time to ask
the experts.  Please also CC me on this, I'm only on the list as a
digest.

I have a dual Xeon 2.8ghz HT server with plenty of ECC ram running Linux
2.6 and MySQL 4.1.8 (4.1.7 also).  Anywhere from 0.001% to 0.05% or so
of the queries (identical) take longer than expected to complete.  Most
queries are reported as completing in 0.030 seconds or less as reported
by time(1). The queries I'm having problems with take 5-15 seconds to
complete, but the weird part is that they're the exact same queries.
There seems to be no load problem (stays under 1.0 most of the time,
lots of free and cached ram) and the problem happens even when the
server is almost 100% idle.  Here is some output from my testing (expl.
under output):

<snip>
real    0m0.045s
user    0m0.007s
sys     0m0.004s

real    0m0.052s
user    0m0.009s
sys     0m0.003s

real    0m0.023s
user    0m0.010s
sys     0m0.004s

real    0m0.023s
user    0m0.011s
sys     0m0.006s

real    0m6.802s
user    0m0.008s
sys     0m0.003s

real    0m0.553s
user    0m0.003s
sys     0m0.004s
<ctrl+c>

Those results are from:

while true; do time mysql -u user -ppass -h mysql-server databasename -e
"SELECT * FROM table WHERE x = 'y';" > /dev/null; done

I CTRL+C'd it when it took 6 seconds. There was about 30 seconds of very
quick responses that I've left out. This is as simple as I can show it,
I first noticed the problem with a custom app that has a 3 second
timeout and was failing at times.

It happens in every table on this server, and I've myismchecked all of
them.  It doesn't seem (seem here, is important) to happen, however,
when the database is copied and ran on a completely unloaded server
(same software).

I've tried using the static mysqld binary from mysql.com with the same
results as the distro's binary.  I've also tried different glibc
versions (although this shouldn't affect the static mysqld anyways) also
with no luck.

I'd be very interested in hearing any theories and/or solutions to my
mystery.

Thanks much,

Dale


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to