Opened 14 years ago

Closed 14 years ago

#11026 closed Bug Report - General (fixed)

mythpreviewgen is run with too high a scheduling priority; causes stuttering playback

Reported by: O Lupton <oliverlupton@…> Owned by: Raymond Wagner
Priority: minor Milestone: 0.27
Component: MythTV - Mythpreviewgen Version: 0.25-fixes
Severity: medium Keywords: mythpreviewgen, nice, ionice
Cc: Ticket locked: no

Description

mythpreviewgen seems to be run by default with too high a cpu/io scheduling priority. This causes stuttering playback (particularly for HD content) if a preview is generated in the background (for example, storing a bookmark in the recording you are watching updates the preview and makes the playback stutter).

For the moment I am working around this by moving mythpreviewgen to mythpreviewgen.real and putting this script in its place:

$ cat bin/mythpreviewgen 
#!/bin/bash
ionice -c 2 -n 7 nice -n 19 /usr/bin/mythpreviewgen.real --seconds 250 "$@"
exit

(this is less annoying, but the --seconds parameter is there because I can't find another way of telling Myth how far too seek)

It would be neater if MythTV could automatically reduce the priority of the mythpreviewgen process.

This seems to have been mentioned on the mailing list in the past, but I couldn't find any tickets relating to it - apologies if I missed one.

Attachments (1)

11026_1.patch (6.8 KB ) - added by Raymond Wagner 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by J.Pilk@…, 14 years ago

My mythcutprojectx script calls mythpreviewgen with ionice -c3, (idle). I use it regularly and I haven't noticed stuttering; but recently danielk pointed out that ionice only works with the default 'cfp' scheduler, whereas I have for years used 'escalator=deadline' when booting the kernel. I use ionice -c3 in several other places too, but wonder if I ought to be using something else. It certainly doesn't deliver on this quote from 'man ionice' : "The impact of an idle I/O process on normal system activity should be zero."

comment:2 by Raymond Wagner, 14 years ago

Milestone: unknown0.27
Owner: set to Raymond Wagner
Status: newaccepted

comment:3 by Raymond Wagner, 14 years ago

The attached patch converts the preview generator to the new MythSystem syntax, and uses it to apply the 'nice' and 'ionice' values internally. It has been compile tested, but not runtime tested.

by Raymond Wagner, 14 years ago

Attachment: 11026_1.patch added

comment:4 by managementboy@…, 14 years ago

have been testing the patch for 2 weeks, no problem

comment:5 by Raymond Wagner <rwagner@…>, 14 years ago

In ecfa569b5df0ce761cda08a211f31b9cfc3ca1fd/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:6 by Raymond Wagner <rwagner@…>, 14 years ago

Resolution: fixed
Status: acceptedclosed

In 1efa59b1c619013ee35b54bea6a9efecbec3b19f/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.