[mythtv-users] Can you "nice" an I/O process

Brian Wood beww at beww.org
Sun Apr 9 21:08:15 UTC 2006


On Apr 9, 2006, at 11:15 AM, Steven Adeff wrote:

> On 4/9/06, Osma Ahvenlampi <oa at iki.fi> wrote:
>> On pe, 2006-04-07 at 14:03 -0600, Brian Wood wrote:
>>> I know how you can "nice" a process to control its use of CPU
>>> resources. What I am wondering is if there is a similar function  
>>> with
>>> I/O, specifically disk reads/writes ?
>>
>> Since Linux 2.6.12 or so, yes, you CAN set a "nice" value to a  
>> process's
>> I/O, and you can even do this independently from its CPU "nice" value
>> (in effect allowing something to use a lot of CPU and only idle disk
>> bandwidth, or vice versa - great for transcoding and recording, in
>> fact).
>>
>> However, this is relatively early in the life of that  
>> functionality, and
>> it's difficult to utilise. Nice'd processes automatically have their
>> ioprio adjusted as well, but changing it otherwise you must have root
>> privileges - it's not even possible for a user process to set  
>> itself to
>> the idle class.
>>
>> http://www.linux-m32r.org/lxr/http/source/Documentation/block/ 
>> ioprio.txt


Much thanks to all who responded, it seems I am not the only one with  
concerns about this matter, but it looks like the kernel people have  
finally done something recently besides break video apps.

Even if "early in the life" of this feature I think I will try and  
use it to advantage.

>
> perhaps a better method for Myth would be to add options to
> mythcommflag and mythtranscode that would let the user cap the bitrate
> at which they operate with a flag?

Yes, an extension of the existing functionality of specifying the  
"ordinary" niceness level. I'd also like to see more than three  
levels to choose from, and in the best of all worlds some way to  
dynamically adjust these parameters depending on system conditions,  
time of day, number of recordings, phase of moon etc.


More information about the mythtv-users mailing list