[mythtv-users] mythbackend still eats memory: the current status

Udo van den Heuvel udovdh at xs4all.nl
Sun Jan 4 11:26:50 UTC 2009


Hello,

As you know MythTV, at least the backend, leaks resources.
Currently I am using svn 19412 of the 'fixes' branch.
Build Date: Sun 21 Dec 2008 03:57:00 PM CET
Install Date: Wed 24 Dec 2008 04:52:24 PM CET

Besides a few 'normal' schedules I run 3 `power searches` with queries like:
channel.callsign = "NL1" AND program.starttime < DATE_ADD( NOW( ) , 
INTERVAL 10 HOUR )
This is to record channels NL1, NL2, and NL3 24/7 off one multiplex and 
to limit the amount of CPU the scheduler wastes on scheduling.

There is 1 minute preroll and postroll on every program, so I have 7 
virtual tuners configured to avoid running out of tuners.
Of course I have 1 real tuner: a DVB-T card in my VIA EN-12000, which 
has 1G of RAM and 1TB of disk.

The box just records, does not much else besides running Fedora 10.
I restarted the backend on 27th of december and since then gathered 
these stats:

%CPU %MEM    VSZ   RSS TTY      STAT START   TIME
  9.5 11.5 444464 112264 ?       Ssl  Dec27  93:15
  9.6 12.3 450640 119536 ?       Ssl  Dec27 233:03
10.0 13.1 459412 127400 ?       Ssl  Dec27 385:30
10.1 14.2 470656 137924 ?       Ssl  Dec27 535:29
10.0 15.1 479536 146984 ?       Ssl   2008 680:09
  9.9 15.7 486244 153016 ?       Ssl   2008 815:54
10.0 16.8 497588 163676 ?       Ssl   2008 963:25
10.0 17.6 505328 171696 ?       Ssl   2008 1108:20

As you can see the virtual size and resident size grow.
And keep growing all the time. (yes, they are)
It's *not just* caused by using EIT or because of the multirec feature.
(multirec is in 'fixes' and thus considered stable)
The issues was also there before I had EIT working.

Running valgrind to find the causes of the presumed leaks is not an 
option due to the lack of CPU in this machine.

 From what I read on this list other people also see similar behaviour 
of the backend (continuously growing memory size).
It's dealt with by restarting the backend every now and then or maybe by 
upgrading to another svn which forces a restart anyhow.

What can we do to fix most of the common leaks and make MythTV run more 
stable this way?

Think of some test-suites to find the most obvious leaks?

Please post your ideas, maybe we can work something out in 2009!

Kind regards,
Udo


PS: w.r.t. CPU: where is that plug-in compatibility that VIA advertised 
for the nano CPU? I want an EN-like board with PCI (not PCIe!) and a 
faster nano CPU.
Same for LT/EK: no PCIe but PCI *with* nano CPU, please.

PS2: Is there a way to run a virtual environment with virtual tuners and 
virtual signals for MythTV's virtual tuners? (my other box can do 
VirtualBox etc)


More information about the mythtv-users mailing list