MythTV Part 4: Tuning and Troubleshooting
Pages: 1, 2

Audio Glitches on Playback

In addition to the audio glitches on playback on KQED, I observed other sporadic audio glitches that looked like performance problems. During playback, the disk activity light is often solid. If the system is attempting to flag commercials in the background in addition to video playback, the disk load can be so high that performance problems result.

Disk Access Scheduling

The 2.6 kernel has three different disk schedulers that can be loaded into the kernel. I experimented with all three of them to see which of them worked the best with a high disk load. As described in the documentation, the deadline scheduler, although the simplest, tends to work best in heavy I/O situations.

For testing, I compiled each of the schedulers as a module so that I could experiment without kernel rebuilds. To use a scheduler, two things must be done: the code must be resident in the kernel, and the scheduler must be selected. I use a simple startup script to activate the deadline scheduler that carries out both steps:

#!/bin/sh
# load and activate deadline i/o scheduler code
modprobe deadline_iosched
cat "deadline" > /sys/block/sda/queue/scheduler

OpenGL and TwinView

The main reason I fiddled with the I/O scheduler was a different performance problem. My initial Fedora-based MythTV system was able to play back high-definition streams without difficulty, but my Gentoo-based system occasionally struggled with the load. By building MythTV with and without OpenGL video timing support, I figured out that the Bob deinterlacing method is extremely taxing when used with both TwinView and OpenGL video timing. Either disabling TwinView or using a real-time clock for video synchronization will eliminate the performance problem. I chose to disable TwinView because I had used it only for troubleshooting. With most of the configuration problems shaken out, I no longer needed the monitor at the side for debugging.

Although it is no longer necessary to use the deadline scheduler, using an I/O scheduler does help to reduce the average disk wait time by synchronizing requests so that they are presented in an intelligent order to the disk. (I believe it also makes disk access slightly quieter because the seek operations tend to be sequential, but the Samsung SpinPoint disks that I use are so quiet it is hard to tell if that is just my imagination.)

What Is That Fuzz at the Top of the Screen?

Some channels may have black and white "fuzz" at the top of the screen, as shown in figure 1. The noise shown is part of the analog television signal called the Vertical Blanking Interval (VBI). Analog television signals trace the electron beam from the lower right to the upper left during the blanking interval. With no visual data transmitted, the visual representation of the signal during the VBI is meaningless.

figure 1 Figure 1: Visible VBI

TV signals are usually overscanned before display, which has the effect of cropping the image. To prevent the display of the static, increase the vertical overscan until it disappears. On my system, the static vanished once the overscan reached 2 percent.

Stay Tuned

Coming up in the next installments: getting the picture right on playback, the setup of the remote controls, and transporting video in a convenient form. You don't want to miss any of it . . .

Matthew Gast works in the Office of the CTO at Trapeze Networks, where he works on product architecture and industry standards. He is a voting member of the IEEE 802.11 working group, and serves as chair of 802.11 Task Group M. At the Wi-Fi Alliance, he chairs the Wireless Network Management marketing task group and the Security technical task group. In 2007, Matthew was a founder of the OpenSEA Alliance, a group which supports the development of open-source network security solutions. He currently serves on the engineering steering committee and on the organization's board of directors.


Return to digitalmedia.oreilly.com