[mythtv] [mythtv-commits] Ticket #1791: Stop transcode/commflag from hogging the CPU while recording/playback is in progress.

Daniel Staaf dst at bostream.nu
Thu Sep 14 19:22:11 UTC 2006

f-myth-users at media.mit.edu wrote:
> Some more research -seems- to indicate that the Breezy kernel these
> machines run might be fixable simply by adding
>   elevator=cfq
> to the boot line, and adding
>   # nonaltoptions=quiet splash elevator=cfq
> so it winds up on kernel updates as well.  I'm hoping that this is
> true, since I'd rather not have to compile a non-stock kernel (as
> your example seems to indicate).
> It also appears I can change this on the fly with
>   echo cfq > /sys/block/hdX/queue/scheduler
> per-disk, and check the current setting for all disks with
>   cat /sys/block/hd*/queue/scheduler
> so I may be able to screw around with this without even rebooting.

Yes, no need to recompile.
You may also want to play with "ionice" from the schedutils package (the
one in Breezy (universe) is to old so you have to compile your own, the
source is at http://rlove.org/schedutils/schedutils-1.5.0.tar.gz).

> [According to the /sys above, my current Breezy kernels seem to be
> using anticipatory (AS) scheduling, which seems like the absolute
> worst case for a system handling realtime video!  Yuck.  This is
> apparently the Breezy default; it appears that it might be the best
> for a system requiring good interactive response but is pitiful for
> I/O latency; c.f. www.redhat.com/magazine/008jun05/features/schedulers/
> for some comparisons run using RHEL4 and a shocking barchart...]

CFQ will be the default for 2.6.18 and later upstream kernels.

/ Daniel

More information about the mythtv-dev mailing list