LinHES Forums
http://forums.linhes.org/

High CPU Usage/Load & High CPU of myth_status.py?
http://forums.linhes.org/viewtopic.php?f=21&t=24371
Page 1 of 1

Author:  RobTheGob [ Sat Jun 18, 2016 11:32 am ]
Post subject:  High CPU Usage/Load & High CPU of myth_status.py?

I had lots of fun during this upgrade! I love LinHES (and KnoppMyth before that) - despite trying other flavours over the 11 years I've been running MythTV - I've always returned to LinHES because it's my favourite!

Things mostly went OK - but my system (Total Running Time: 10 years 8 months 8 days 13 hrs!) started acting odd and when I finally realized what was happening, my boot drive had failed. It hadn't been running well and the backup hadn't completed, so my recovery was created from what I could get from the dead drive and a 2 day old backup.

I started placing my custom modprobe.d and channel change scripts (etc...) in the correct spots and by the middle of the week, it started running well. I had some issues with database permissions (that may be related to my new issues). After the change to the new drive - I had to adjust several copies of config.xml to point at localhost rather than my previous local IP address - otherwise, database access errors occurred (in some places). I couldn't seem to make everything work by adjusting the MySQL permissions.

Anyways - I noticed yesterday that the myth_mtc hasn't been able to run for a day or so (despite running once or twice after the middle of the week). A quick look at MySQL shows that there were inuseprograms, despite everything reporting as completed or the recordings in question already deleted. I thought I'd leave it alone and we started watching a movie last night and the mythbackend would occasionally restart - I had a look and the load was in the hundred's!

I shut down mythbackend and manually cleaned up the database (removing the inuseprograms entries) - and after a few mythbackend restarts, it seemed to return to normal. The myth_mtc cron script ran OK overnight and the load dropped down to an acceptable level. All week the CPU/load graph has been covered with very high spikes, which I don't recall experiencing before the upgrade (although I lost most of my historical data...).

Then this morning - I see the load is creeping up again. One thing I noticed - myth_status.py is continuously (every few seconds) popping up in top, owned by root and showing a new PID each time. I'm not sure what is causing that - so I temporarily stopped it by renaming myth_status.py, otherwise the number of PID's was getting HUGE... Once I did that - once again the load seems to level off.

Sorry for the rambling story - I'm still battling this and thought I'd try to document it here, as I continue to investigate.

Author:  RobTheGob [ Sun Jun 19, 2016 12:06 pm ]
Post subject:  Re: High CPU Usage/Load & High CPU of myth_status.py?

Since I renamed myth_status.py, there have been no CPU/load spikes or mythbackend restarts... See the attached image:

Image

I'll have to investigate more when I get a chance - but I'm just happy that it once again is usable and working!

Author:  brfransen [ Sun Jun 19, 2016 2:23 pm ]
Post subject:  Re: High CPU Usage/Load & High CPU of myth_status.py?

Your config.xml issues could be part of the issue. By default LinHES tries to symlink /home/mythtv/.mythtv/config.xml and /root/.mythtv/config.xml to /usr/share/mythtv/config.xml so if you change 1 you change all. But if you are missing the root one or it isn't a link but a separate file that would be a problem. That said I am not sure what could be firing myth_status.py every few seconds. That is only suppose to fire on a session login.

Author:  RobTheGob [ Sun Jun 19, 2016 4:54 pm ]
Post subject:  Re: High CPU Usage/Load & High CPU of myth_status.py?

brfransen wrote:
Your config.xml issues could be part of the issue. By default LinHES tries to symlink /home/mythtv/.mythtv/config.xml and /root/.mythtv/config.xml to /usr/share/mythtv/config.xml so if you change 1 you change all. But if you are missing the root one or it isn't a link but a separate file that would be a problem. That said I am not sure what could be firing myth_status.py every few seconds. That is only suppose to fire on a session login.


Thanks.

Yeah - I don't recall ever changing or adjusting the config.xml until mid-week (when I was having the DB authentication issues) and the last time I recall setting DB credentials they were in my.cnf!!

When I looked at my semi-working system earlier this week - I found config.xml files in the various places and read on MythTV how they functioned. At that time - there were no symlinks, just several versions of the files with slightly different <Host> values.

I'll adjust things (and add symlinks) and see what happens. I may have some of the files from the failed drive that I can compare to... I never found a smoking gun about the myth_status.py firing so often... That sure seems related to my extremely high loads.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/