[mythtv] MythTV and memory (leaking?)

steve at daviesfam.org steve at daviesfam.org
Sat Aug 14 02:30:52 EDT 2004


I sat down to watch the Olympics opening last night...  via Myth's live tv 
mode.

Playback was a bit spoilt because the box wasn't keeping up all the time - 
juddering pic at quite frequent intervals

My box is Asus Pundit, P4 2.4GHz, 512MB ram, 1xPVR350, 1xPVR250.  Output 
is via the 350.  

Myth os CVS head from about 2 weeks ago.

The box was recording something else, and also doing the live.

On SSHing in, the box was not using much CPU - plenty free.  But, it was 
something like 240MB deep in swap, with vmstat showing 20 to 100+ swapins 
and swapouts.

Watching vmstat, the allocated memory seemed to be climbing steadily - 
anoher megabyte or so every minute.

ps looked like this:

root at sue steve # ps alxwww
F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0   8   0  1476  368 select S    ?          0:04 init [3]
1     0     2     1   9   0     0    0 ?      DW   ?          0:12 [keventd]
1     0     0     1  19  19     0    0 ksofti SWN  ?          0:00 [ksoftirqd_CPU0]
1     0     0     1  10   0     0    0 kswapd SW   ?          2:46 [kswapd]
1     0     0     1   9   0     0    0 bdflus SW   ?          0:00 [bdflush]
1     0     0     1   9   0     0    0 kupdat SW   ?          0:00 [kupdated]
1     0     7     1   9   0     0    0 pagebu SW   ?          0:00 [pagebufd]
1     0     8     1   9   0     0    0 pagebu SW   ?          0:05 [xfslogd/0]
1     0     9     1   9   0     0    0 pagebu SW   ?          0:00 [xfsdatad/0]
1     0    11     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
5     0   161     1   8   0  1840  392 devfsd S    ?          0:00 /sbin/devfsd /dev
1     0   381     1   9   0     0    0 ?      SW   ?          0:00 [khubd]
1     0   389     1   9   0     0    0 down_i SW   ?          0:00 [knodemgrd_0]
1     0   426     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
1     0   427     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
1     0   428     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
1     0   429     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
1     0   430     1   9   0     0    0 kjourn SW   ?          0:00 [kjournald]
1     0   956     1   9   0  1588  436 poll   S    ?          0:00 metalog [MASTER]
5     0   958   956   9   0  1552  344 syslog S    ?          0:00 metalog [KERNEL]
1     0  1094     1   9   0  1512  416 select S    ?          0:00 /sbin/cardmgr -s /var/run/stab -v -f
5     0  1124     1   9   0  1532  420 select S    ?          0:02 /usr/sbin/lircd
0     0  1188     1   9   0  2484  476 wait4  S    ?          0:00 /bin/sh /usr/bin/mysqld_safe
4    60  1260  1188   9   0 43028 2384 select S    ?          0:00 [mysqld]
1    60  1261  1260   7   0 43028 2384 poll   S    ?          0:00 [mysqld]
1    60  1262  1261   9   0 43028 2384 rt_sig S    ?          0:00 [mysqld]
1    60  1263  1261   9   0 43028 2384 rt_sig S    ?          0:00 [mysqld]
5     0  1355     1   8   0  2152 2144 select SL   ?          0:00 /usr/bin/ntpd -p /var/run/ntpd.pid
5     0  1395     1   9   0  6988   88 select S    ?          0:00 /usr/sbin/smbd
5     0  1398     1   9   0  3732  596 select S    ?          0:03 /usr/sbin/nmbd
5     0  1447     1   9   0  3340  160 select S    ?          0:00 /usr/sbin/sshd
1     0  1494     1   9   0  1680  144 nanosl S    ?          0:00 /usr/sbin/cron
4     0  1541     1   9   0  1508   32 read_c S    vc/1       0:00 /sbin/agetty 38400 tty1 linux
4     0  1542     1   9   0  1508   32 read_c S    vc/2       0:00 /sbin/agetty 38400 tty2 linux
4     0  1543     1   9   0  1508   32 read_c S    vc/3       0:00 /sbin/agetty 38400 tty3 linux
4     0  1544     1   9   0  1508   32 read_c S    vc/4       0:00 /sbin/agetty 38400 tty4 linux
4     0  1545     1   9   0  1508   32 read_c S    vc/5       0:00 /sbin/agetty 38400 tty5 linux
4     0  1546     1   9   0  1508   32 read_c S    vc/6       0:00 /sbin/agetty 38400 tty6 linux
1     0  1564     1   9   0  3464  348 rt_sig S    ?          0:02 /usr/X11R6/bin/xdm
4     0  1570  1564   9   0 20620  424 select S    ?          1:18 /etc/X11/X -auth /etc/X11/xdm/authdir/authfiles/A:0-2W2PUg
5     0  1571  1564   9   0  4352   20 wait4  S    ?          0:00 -:0
4  1001  1655  1571   8   0  2140   12 wait4  S    ?          0:00 /bin/sh /home/steve/.xsession
0  1001  1676  1655   9   0  3688  200 select S    ?          0:00 bbkeys -i
0  1001  1677  1655   9   0  6016   52 select S    ?          0:00 [xterm]
0  1001  1678  1655   9   0  6016  132 select S    ?          0:00 [xterm]
0  1001  1680  1655   9   0  4044  400 select S    ?          0:00 blackbox
0  1001  1682  1678   9   0  2344  284 wait4  S    pts/0      0:00 bash
0  1001  1683  1677   9   0  2336    4 read_c S    pts/1      0:00 bash
5     0  1984  1395   9   0  7628  372 select S    ?          0:46 [smbd]
5   111  8197     1   9   0  1692   32 poll   S    ?          0:00 [portmap]
5 65534  8208     1   9   0  1660    0 select SW   ?          0:00 [rpc.statd]
5     0  8217     1   9   0     0    0 ?      SW   ?          0:24 [nfsd]
5     0  8218     1   9   0     0    0 ?      SW   ?          0:23 [nfsd]
5     0  8219     1   9   0     0    0 ?      SW   ?          0:29 [nfsd]
1     0  8220     1   9   0     0    0 ?      SW   ?          0:00 [lockd]
1     0  8221  8220   9   0     0    0 ?      SW   ?          0:00 [rpciod]
1     0  8222     1   9   0     0    0 ?      SW   ?          0:23 [nfsd]
1     0  8223     1   9   0     0    0 ?      SW   ?          0:27 [nfsd]
1     0  8224     1   9   0     0    0 ?      SW   ?          0:27 [nfsd]
5     0  8227     1   9   0  1792  168 select S    ?          0:00 /usr/sbin/rpc.mountd
5     0 15951  1447   9   0  5992  532 unix_s S    ?          0:00 sshd: steve [priv]
5  1001 15953 15951  10   0  6072  732 select S    ?          0:00 [sshd]
0  1001 15954 15953   9   0  2336  496 wait4  S    pts/2      0:00 -bash
4     0 15963 15954   9   0  2200  496 wait4  S    pts/2      0:00 [su]
4     0 15964 15963  14   0  2344  956 wait4  S    pts/2      0:00 bash
1  1001 16120     1   9   0 124024 8612 select S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1    60 16122  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16123  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16124  1261   9   0 43028 2384 unix_s S    ?          0:01 [mysqld]
1    60 16125  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16126  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16127  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16128  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16129  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16130  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1  1001 16133 16120   8   0 124024 8612 poll  S    ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16134 16133   9   0 124024 8612 nanosl S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1    60 16135  1261   9   0 43028 2384 unix_s S    ?          0:01 [mysqld]
1  1001 16143 16133   9   0 124024 8612 nanosl S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16145 16133   9   0 124024 8612 nanosl S   ?          0:04 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16146 16133   9   0 124024 8612 nanosl S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16147 16133   9   0 124024 8612 nanosl S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16149 16133   9   0 124024 8612 nanosl S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16154 16133   9   0 124024 8612 rt_sig S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16155 16133   9   0 124024 8612 rt_sig S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16156 16133   9   0 124024 8612 rt_sig S   ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16157 16133   9   0 124024 8612 select S   ?          0:01 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16158 16133   9   0 124024 8612 rt_sig S   ?          0:01 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
0  1001 16199  1682   9   0 83256 4996 nanosl S    pts/0      0:03 mythfrontend
1    60 16200  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1    60 16201  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1  1001 16204 16199   9   0 83256 4996 poll   S    pts/0      0:00 mythfrontend
1  1001 16205 16204   9   0 83256 4996 nanosl S    pts/0      0:00 mythfrontend
1    60 16211  1261   9   0 43028 2384 unix_s S    ?          0:00 [mysqld]
1  1001 16212 16204   9   0 83256 4996 nanosl S    pts/0      0:01 mythfrontend
1  1001 16213 16133  10   0 124024 8612 nanosl S   ?          0:01 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16214 16133   9   0 124024 8612 ?     S    ?          0:00 /usr/local/bin/mythbackend -p /var/run/mythtv/mythbackend.pid -l /var/log/mythtv/mythbackend.log -d
1  1001 16215 16204   9   0 83256 4996 poll   S    pts/0      0:02 mythfrontend
1  1001 16216 16204   9   0 83256 4996 select S    pts/0      0:01 mythfrontend
1  1001 16217 16204   9   0 83256 4996 nanosl S    pts/0      0:00 mythfrontend
0     0 16266 15964  18   0  3248 1548 -      R    pts/2      0:00 ps alxwww


Is there a problem?  back and frontend sure have allocated a lot of 
memory.  Is this a leak?  Do you now need 1GB to run a Myth system?

Thanks,
Steve



More information about the mythtv-dev mailing list