Raid performance still poor

So last night having some problems with recordings, and some in the house are rather unhappy that reality TV isn’t getting recorded successfully.  The recording is cutting out about 15 minutes in.

From the logs I can see a few things:

1. I’m getting lots of log entries like these:

2013-02-04 21:33:20.556120 W [21378/14006] RecThread ThreadedFileWriter.cpp:302 (Flush) - TFW(/usr/share/mythtv/recordings/6006_20130204082002.mpg:88):
Taking a long time to flush.. buffer size 6333344

2. I get an error like this when the recording aborts:

2013-02-04 21:33:47.499270 I [21378/21388] TVRecEvent tv_rec.cpp:830 (FinishedRecording) - TVRec(16): FinishedRecording(6006_2013-02-04T08:20:02Z) damaged recq:<RecordingQuality overall_score="0" key="6006_2013-02-04T08:20:02Z" countinuity_error_count="0" packet_count="62006">    <Gap start="2013-02-04T08:30:00Z" end="2013-02-04T10:32:48Z" duration="7368" /></RecordingQuality>

I think I have two different things going on.  The second error looks to be the tuner failing in one way or another.  I’m using an hdhomerun, which is an ethernet connected tuner.  I have a crappy ethernet cable on it, with the tabs at each end broken off.  So it sometimes isn’t connected as well as it could be.  I replaced with another cat6 cable that has proper ends.  Hopefully this is the main change that makes a difference.

Secondly, the buffer errors I think are problems with writing.  I have this niggle that whilst my other performance changes in theory help my sequential reads and writes, that they are delaying random writes.  I’m not really sure, but I’ve noticed that my RAID performance is all over the place.  I’m going to write a script that tunes the array then tests the throughput – but it needs to test the throughput from a multithreaded read and write scenario.  Anyway, in the meantime I set the read ahead to 1024 (rather than 8192 I was using), and the stripe-cache to 256 (rather than the 2048 I was using).

I then downloaded hdhomerun_config

  aptitude install hdhomerun-config          # on debian

And ran it to see what my tuner is doing – my suspicion is that I’m not getting a high quality signal from the new aerial I installed.

  hdhomerun_config 1110721D get /tuner0/status
  ch=t7qam64:226500000 lock=t7qam64 ss=100 snq=100 seq=100 bps=23048800 pps=522

The important measures are the ss (signal strength?) and snq (signal to noise ratio) I believe, both are showing 100.  I think the signal is fine.

Set it up to record a bunch of shows off 7 last night, as that’s the channel that’s been giving issues.  No errors in the log overnight, other than a couple of these at 6am this morning:

2013-02-04 06:03:01.971378 W [21378/1135] TFWWrite ThreadedFileWriter.cpp:500 (DiskLoop) - TFW(/usr/share/mythtv/recordings/6032_20130203185000.mpg:80): write(63920) cnt 28 total 1645000 -- took a long time, 1537 ms

Tentatively declaring success.  We’ll see how we go with real recordings tonight.

By the way, super scary TV in the middle of the night.  Apparently people who can’t sleep want to buy mops, cooking kit, and worry about their kids not learning maths properly.  Who knew?




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s