Opened 12 years ago
Closed 11 years ago
#11026 closed Bug Report - General (fixed)
mythpreviewgen is run with too high a scheduling priority; causes stuttering playback
Reported by: | 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)
Change History (7)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Milestone: | unknown → 0.27 |
---|---|
Owner: | set to Raymond Wagner |
Status: | new → accepted |
comment:3 Changed 12 years ago by
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.
Changed 12 years ago by
Attachment: | 11026_1.patch added |
---|
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
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."