[mythtv-users] Disk performance issues
mikko.ronkko at iki.fi
Wed Feb 3 20:24:42 UTC 2010
I encountered a funny issue today. I have a atom 330 box with a relatively slow 5400 rpm disk that serves as a backend and as a frontend. The back end was recording three recording with one tuner card on a single transport. On top of that, there were at least two commercial flagging jobs going.
Then my wife wanted to watch Grey's Anatomy on the frontend. Starting the frontend from myhtwelcome took 30 seconds and another 30 to start playback. After this, VDF display on the box started to malfuntion. Surprisingly, the there were no problems with the playback.
I ssh'd into the box and noted this repeating in the backend log
2010-02-03 21:47:24.112 DB Error (delta position map insert):
INSERT INTO recordedseek (chanid, starttime, mark, type, offset) VALUES ( ? , ? , ? , ? , ? );
:CHANID=1006, :MARK=63384, :OFFSET=1193944008, :STARTTIME=2010-02-03T21:00:00,
No error type from QSqlError? Strange...
2010-02-03 21:47:24.113 Error preparing query: INSERT INTO recordedseek (chanid, starttime, mark, type, offset) VALUES ( :CHANID , :STARTTIME , :MARK , :TYPE , :OFFSET );
2010-02-03 21:47:24.238 Driver error was [2/144]:
QMYSQL3: Unable to prepare statement
Database error was:
Table './mythconverg/recordedseek' is marked as crashed and last (automatic?) repair failed
The disk cache was 1.5Gb, and dstat showed the following.
mronkko at hondchan:~$ dstat
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
22 4 60 14 0 1| 208k 2602k| 0 0 | 170B 2993B|1764 2375
26 4 56 12 0 1| 0 3000k| 222B 1188B| 0 0 |1960 2704
30 4 50 15 0 1| 0 3128k| 132B 708B| 0 0 |1970 2690
27 4 53 14 0 2| 0 3064k| 132B 708B| 0 0 |1953 2642
I suspect that this is caused by the disk having hard time keeping up with MythTV
When the show ended, I checked the other two recordings. One was still recording since it is a two hour show and the second was just about to end. The weird thing is that in the program guide, the show was marked from 9:00 to 10:00, but the recording was from 9:00 to 10:09. All the shows
The same disk has been capable of recording at least three programs simultaneously, so I do not know what the issue was.
Now to my question: Is it possible to detect that IO is saturated and pause non-critical jobs? I know that this could be done with a shell script, but can it be done without an external script?
mikko.ronkko at iki.fi
tel: +358 50 387 8155
More information about the mythtv-users