Responsibilities of the main mysqld thread?

Responsibilities of the main mysqld thread?

am 20.08.2010 18:39:59 von Tom Kleinpeter

I've been watching our mysqld procs in htop and the root thread is
using 75-100% of a CPU most of the time. I'm trying to understand
what that is being used for, and so I was hoping someone could tell me
what that thread does that might be using a lot of CPU.

We are using 5.5.4-m3, we use MyISAM tables with full text indexes, do
around 1500-2000 queries per second, accept around 150 connections per
second, and at the moment both our key cache and our query cache are
disabled (I was curious if that contention was an issue). CPU usage
didn't really change with the caches disabled.

The server is doing around 2 megabytes of traffic per second. We
store a bunch of data compressed, and use "uncompress(columnName)" in
queries to get it back out. None of these things set off any red
flags for me, but it has been a number of years since I've tuned
MySQL, so I don't really trust myself.

Thanks,
Tom

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Responsibilities of the main mysqld thread?

am 21.08.2010 13:53:04 von ASHISH MUKHERJEE

--0016369c897ad53d56048e540ee7
Content-Type: text/plain; charset=ISO-8859-1

Couple of thoughts ...

lsof -p may give some clue of what files/tables it's
reading/writing. From that you may be able to deduce something useful.

Check the slow query log and see if any of the queries are CPU-intensive (by
doing an EXPLAIN) and are the bottleneck.

- Ashish

On Fri, Aug 20, 2010 at 10:09 PM, Tom Kleinpeter wrote:

> I've been watching our mysqld procs in htop and the root thread is
> using 75-100% of a CPU most of the time. I'm trying to understand
> what that is being used for, and so I was hoping someone could tell me
> what that thread does that might be using a lot of CPU.
>
> We are using 5.5.4-m3, we use MyISAM tables with full text indexes, do
> around 1500-2000 queries per second, accept around 150 connections per
> second, and at the moment both our key cache and our query cache are
> disabled (I was curious if that contention was an issue). CPU usage
> didn't really change with the caches disabled.
>
> The server is doing around 2 megabytes of traffic per second. We
> store a bunch of data compressed, and use "uncompress(columnName)" in
> queries to get it back out. None of these things set off any red
> flags for me, but it has been a number of years since I've tuned
> MySQL, so I don't really trust myself.
>
> Thanks,
> Tom
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=ashish.mukherjee@gmail.co m
>
>

--0016369c897ad53d56048e540ee7--