[mythtv-users] What is Myth using real-time threads for?
levander at mindspring.com
Tue Dec 4 11:11:45 UTC 2007
I enabled realtime threads by modifying limits.conf and doing the Myth frontend configuration as according to the Installing and Using MythTV HOWTO (you have to go down just a little from this link):
I did get the "myth is using realtime" message in mythfrontend.log.
Then, to check to see what's going on with the threads, I ran the command:
ps axmo pid,class,pcpu,rtprio,pri,comm
So, the order of the columns is 1.) process id, 2.) class - which is the scheduling class, TS for regular, and FF for fifo which is one of Linux's quasi realtime scheduling classes, 3.) the percentage of cpu being used, 4.) realtime priority - much like priorities for nice, 5.) the regular normal scheduling priority, and 6.) The command name.
I started to put the command output in this email, but there's so much formatting, it will never show up in people's mail readers okay. If you want to see the output, just pipe the command to less, and search for "mythfront" in the output.
I turn Myth on and before I start watching television, from running the ps command, for mythfrontend I get two threads, both with TS as their scheduling class, like 1% CPU being used.
I hit "Watch TV" on myth frontend and run the ps command. I get eight threads, and one of them does have FF as the scheduling class, but it's only using 0.5% of the cpu. There's another thread that's using 55.8% of the CPU, and I think that would be the video decoding thread, but it's got TS as its scheduling class.
So, I enable PiP, and now the ps command gives me 11 threads. There's one thread with FF as the scheduling class, it's using 1.8% of the CPU. There are two threads using high amounts of CPU, which I assume are the video decoding threads. One for the main picture, and the other for the PiP. One is using 54.3%, and the other is using 41.1% (it's a dual CPU machine, the percentages are percentages of a single CPU). Both of there scheduling classes are TS.
I'm using hardware encoding on a WinTV 500, so I wouldn't think any threads doing encoding would use much CPU which is why I don't try to account for them above.
I'm probably just misreading the output of ps. I just learned how to use this stuff the other day. I wouldn't be surprised if the FF thread is some kind of "parent" of the two TS threads doing video decoding which use high CPU. So, because their parent are real-time, they really are real-time too, despite what ps reports.
If anybody knows, I'd love to hear it,
More information about the mythtv-users