Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: performance during cutting



On Tue, 26 Mar 2002 12:16:47 +0100 (MET), thees@informatik.uni-kl.de
wrote:

> I already tried to slow down the thread by inserting 
> usleep()-calls with several times, 

I have also added usleep calls into the cutting thread until the cutting
rate was not more than about 3 MB/s. With this the response time and
cutting time is acceptable.

> but I think
> the main problem is the caching strategy of the kernel/filesystem. 

This is one of the problems. The other problem is the cpu usage, at
least with slower cpus. Please run top during cutting and you will see.

> What do you think about this?

I am not really sure if this will help. That is certainly a rather
complicated change. We don't know whether this will improve the
responsivness unless someone does experiments. 

If really the write back is the problem then fsync every few MB may
avoid the use of buffers which contain valuable information. 

Direct write-through to disk without using the buffer pool may be even
better. The same is true with reading the files. Reading files larger
than the memory makes the buffer cache pretty useless. For this use a
kind of raw mode for files would be nice. You use only a fixed amount of
buffering to do write-behind and read-ahead just enogh to keep the data
flowing. The buffers used should not change but should be reused. With
this all other buffers containing important information are left
untouched.

Emil



Home | Main Index | Thread Index