[mythtv] mythtranscode is niced, why not mythcommflag?

Robert Tsai rtsai1111 at comcast.net
Wed Apr 20 22:23:55 UTC 2005


It seems they both ought to be able to have similar CPU consumption
properties (which today is pretty simple).

The decision of whether or not to nice (jobQueueCPU < 2) is copied
from that used to nice mythtranscode.

I am noticing that UserJobs have a more fine-grained nicing logic;
they can nice 10 or 17 for "Medium" and "Low" CPU usage, but I'll make
mythtranscode look like mythcommflag ...

My patch:

Index: libs/libmythtv/jobqueue.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/jobqueue.cpp,v
retrieving revision 1.22
diff -u -r1.22 jobqueue.cpp
--- libs/libmythtv/jobqueue.cpp 16 Apr 2005 20:58:40 -0000      1.22
+++ libs/libmythtv/jobqueue.cpp 20 Apr 2005 22:18:53 -0000
@@ -1669,6 +1669,9 @@
     if (stillRecording)
         cmd += " -l";

+    if (jobQueueCPU < 2)
+        nice(17);
+
     breaksFound = myth_system(cmd.ascii());

     controlFlagsLock.lock();

--Rob


More information about the mythtv-dev mailing list