[mythtv-users] Scheduler interrupts playback

Raymond Wagner raymond at wagnerrp.com
Wed Feb 29 22:10:42 UTC 2012


On 2/29/2012 15:33, Paul Warren wrote:
> On 28/02/2012 20:56, Raymond Wagner wrote:
>> On 2/28/2012 15:09, Paul Warren wrote:
>>> I'm experiencing occassional pauses in playback lasting a few seconds.
>>> As far as I can tell they usually coincide with when recordings are
>>> starting or finishing, so I'm guessing it's the scheduler running.
>>>
>>> I've found various other threads on this issue, one of which gave the
>>> MySQL query which the scheduler runs.  I've tried running this manually,
>>> but have never managed to trigger the problem, despite the query taking
>>> up to 18 seconds.
>> What processor is this being run on?  What kind of disk?  What filesystem?
> Backend is 800MHz AMD Athlon(tm) II Neo N36L Dual-Core.
>
> MySQL is on a single SATA disk.  video files are on a software RAID 10
> array across 4 other SATA disks.
>
> FS on both is ext4.

Unless you've underclocked it further, that chip runs at 1.3GHz.  Maybe 
you're looking at the C&Q speed or memory clock.  A side note, there is 
no reason to run RAID 0 anything with regards to MythTV.  Writes will be 
spread out across multiple disks automatically through Storage Groups, 
without suffering the reduced write IO that results from having two 
striped disks having to seek synchronously for all writes.

The issue you're seeing is likely a mix of lower end CPU, and the EXT4 
barriers behavior that has been complained about on the mailing list for 
around a year now.  EXT4 enables barriers by default, which means writes 
flushed to disk must reach the platter, rather than simply hitting 
another stage of cache.  MySQL flushes its writes for atomicity, so each 
time you store a new seek point, update a filesize, or one of a number 
of other things that results in several inserts or updates per second 
per recording, MySQL has to wait for your disk.

Normally, MySQL would have no trouble handling this kind of load.  
However, if the scheduler is running full out on the database at the 
same time, everything starts to get backed up, resulting in playback 
pauses, and delayed startup of recordings.


More information about the mythtv-users mailing list