mysqld_safe and high cpu usage

Just started with my first linode, I selected the mercury/pantheon lamp stack script and haven't changed any of the default config settings.

I've added a drupal site and postfix.

I get email alerts that I am using over 100% of cpu

here is top readout: (mysqld_safe holds at 100% all the time)

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

19016 root 20 0 1764 44 20 R 100 0.0 2069:34 mysqld_safe

578 root 20 0 2484 1184 884 R 0 0.1 0:01.70 top

1 root 20 0 2536 592 372 S 0 0.0 0:00.62 init

2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd

3 root RT 0 0 0 0 S 0 0.0 0:00.05 migration/0

Is that enough info for anyone to help with suggestions on how to reduce my cpu usage?

1 Reply

It's been a while since I used MySQL (Thanks Redis!) but mysqld_safe should just be the control script for managing the MySQL daemon, not much to do with the actual running MySQL server itself, I think?

In which case if it's using any meaningful amount of CPU at all it's probably just broken. Try shutting down the MySQL server using init or service or whatever, then just force kill the mysqld_safe and reboot when you're sure it's gone, sounds like it'd be the safest quick, easy fix that might work.

[ Edit: After thinking this couldn't be that rare, ~~[url=http://www.google.com/search?hl=en&safe=on&q=mysqld_safe+high+cpu+usage]~~a quick Google turns up the interesting issue that this happens quite often… There are all sorts of ways of attempting to get around it, too, by the look of things, but what I've suggested is likely going to be quicker than any of them. Low disk space would probably be the common suggestion that I'd look into next. ]

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct