[MPlayer-users] Re: mplayer + heavy io: why ionice doesn't help?

The Wanderer inverseparadox at comcast.net
Sun Aug 20 00:28:27 CEST 2006


Denis Vlasenko wrote:

> On Friday 18 August 2006 20:01, Eric Piel wrote:

>> IOnice only works with CFQ, have you checked that you are using the
>> CFQ IO scheduler?
>> # cat /sys/block/hda/queue/scheduler   #put the name of YOUR harddisk
>> 
>> In case it's not the default IO scheduler, you can change it with:
>> # echo cfq > /sys/block/hda/queue/scheduler
> 
> Thanks!
> 
> It helps. mplayer skips much less, but still some skipping is
> present. I experimented with forcing entire file to be present in the
> pagecache, and in this case mplayer almost never skips.
> 
> Looks like mplayer have very little tolerance for reads randomly
> taking more time to read input stream.
> 
> However, I then looked into the mplayer's source (I wondered why it
> doesn't do read buffering itself)...

It *does* - just not by default, because (believe it or not) buffering
too much can cause problems with some streams. (Or so I recall from the
last time I saw the matter discussed.) That's what the '-cache' option
does: tells MPlayer to buffer that much data before playing, and do its
best to keep that much data in the buffer during playback.

> The code is, um, less than pretty.

Yeah... it's been well known for years that MPlayer's main code needs
some serious cleanup, probably to the point of a total rewrite. However,
so far no one's found it more worth their while to do that than to hack
around in the existing code.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-users mailing list