[mythtv-users] system profiling / cpu usage revisited
mOjO
mOjOspam at thegeekclub.net
Thu Jun 19 19:35:15 EDT 2003
i've got an athlon XP 1700, 512MB ram, SiS 740 chipset, and running
gentoo linux (2.4.20 kernel)...
i recorded a TV show (at mpeg-4, 640x480 i think it was) and watched it
at the same time and ran around 10-20% idle... without watching it at
the same time i think it was more like 30% idle... sorry i did not log
any of the stats.
i think you failed to mention one thing in all that massive amount of
data... what resolution where you recording at? many of us have
experienced dramatic difference in cpu results between 480x480 and
640x480....
i'm no linux guru (nor do i know much about myth, ive got my own
problems!) but from my occasional reading of this mailing list over the
last couple weeks i have seen/heard the following which may help you:
1.) some people said that running the mythbackend as root (as a system
daemon usually) allows it to assign greater priority to certain threads
thereby improving recording quality.
2.) some people had strange performance issues with 2.4.21 or at least
thought they did and claimed going back to 2.4.20 solved them and yet
others have said that they run 2.4.21 fine... i dont think a consensus
has been reached on whether there are issues with that kernel and myth
or not.
good luck,
mOjO
Brian Lalor wrote:
> Ok, I've been doing some poking around with iostat and vmstat. I
> changed my settings so that I'm now doing MPEG-4 encoding (exact
> params not important ATM). My CPU's at ~100% most of the time that
> this recording is taking place. iostat shows:
>
> Time: 03:44:55 PM
> avg-cpu: %user %nice %sys %idle
> 99.10 0.00 0.70 0.20
>
> Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s \
> avgrq-sz avgqu-sz await svctm %util
> /dev/hda 0.00 46.00 0.00 8.80 0.00 438.40 0.00 219.20 \
> 49.82 4294697.37 0.80 113.64 100.00
> /dev/hda5 0.00 45.00 0.00 6.40 0.00 411.20 0.00 205.60 \
> 64.25 0.06 0.94 0.47 0.30
>
> Top shows mythbackend as the biggest CPU hog currently (of course):
> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
> 29384 myth 9 0 41700 31M 3360 S 98.3 6.3 17:47 0
> mythbackend
>
> Let me just preface my remarks by saying that I don't really know the
> first thing about the workings of the kernel and system tuning, but I
> really want to get this sorted out, as I see many people having these
> issues. It may be a bad choice of hard drive or motherboard, but I
> want to get to the bottom of it.
>
> First, as iostat shows above (sorry for the line-wrapping), my CPU's
> maxxed out by user processes, not by the kernel. Doesn't this mean
> that it is in fact mythbackend that is tying up the CPU by compressing
> the data, rather than (if %sys were very high) that the kernel was
> spending all of its time in I/O routines?
>
> Second, the wkB/s column shows that I'm dumping about 205kB to the
> partition (/dev/hda5 is where my recordings go) a second (or around 1
> meg every four seconds). hdparm tells me my disk throughput is around
> 30 meg/s, so that should be plenty. I don't know what to make of the
> write queue information.
>
> Lastly, here's some vmstat info:
> procs memory swap io
> system cpu
> r b w swpd free buff cache si so bi bo in cs
> us sy id
> 1 0 0 17228 4408 41016 365680 0 0 0 198 164 296
> 100 0 0
>
> Again we see my CPU maxxed, plenty of un-used memory, a bunch of
> blocks being written to the disk and a butt-load of context switches
> in the last two seconds (time since the last report). Does that seem
> like a lot? I dunno. Maybe someone else can do a similar analysis on
> a similar machine that can do the MPEG-4 encoding without breaking a
> sweat? Here's a breakdown of my hardware again:
> Asus A7V8X-X motherboard (via chipset)
> AMD AthlonXP 1700+
> 512MB PC2700 DDR RAM
> WinTV-dbx tuner card
> 120GB 7200RPM Hitachi IDE drive
> linux kernel 2.4.21 compiled exactly for my hardware (mostly as
> reported via lspci)
>
> Collecting data is easy. Analyzing it is hard. :-)
>
> Thanks,
> B
>
More information about the mythtv-users
mailing list