[mythtv-users] Issues with 0.25
Terjesen Jens Peder
Jens.Peder.Terjesen at devoteam.com
Wed Mar 7 08:06:51 UTC 2012
On 6. mars 2012 3:27 Gary Buhrmaster wrote:
On Tue, Mar 6, 2012 at 02:54, Terjesen Jens Peder ....
> After a bit more digging it looks like mysqld is using 90-100% of one core for long periods of time.
That type of CPU usage seems excessive even for a somewhat slow backend. It is possible that your database is corrupt or has bad statistics causing high cpu usage.
As a first step, I would recommend you look at the wiki at:
and first backup the database, and then perform the steps regarding "Optimize the Database".
Also note that if you manually configured various mysql tunables in the past, you may need to review those settings (some of the recommendations from various past postings are no longer optimal).
Yes I have been running the optimize_mythdb.pl as a cron job every night.
Yesterday I used the mysql-administrator application to check all tables, they were all OK.
I also used it to optimize all tables. For good measure I also ran the optimize_mythdb.pl manually.
Still the same high CPU load.
I then used the mysqltuner.pl script which suggested to increase some buffers. This didn't make any difference.
Since I have used mysqltuner.pl in the past and made some changes to my.cnf I decided to remove the mysql RPM package, removed the old my.cnf then reinstalled the mysql RPM package.
With the default configuration mysqld peaked at about 82% CPU as opposed to about 92% with the previous (tuned) configuration. After running mysqltuner.pl again and increasing buffers as suggested the CPU load was back at about 92%.
So I guess that with a not tuned configuration mysqld is memory or disk bound, but tuning the configuration makes it CPU bound. The big question is still what is it doing?
I will try to disable logging to the database to see if that makes any difference.
More information about the mythtv-users