Mailing List archive

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

[vdr] Re: Recordings menu sluggish - *the* solution.




Carsten Koch wrote:

Yes, but that solution is complicated as well and it would be a
wasted effort after implementing O_DIRECT. And O_DIRECT gives
us 300% of the usefulness:

*  O_DIRECT solves the "Recordings menu sluggish" problem in an
   elegant way.

*  It makes all of VDR I/O on nnn.vdr files faster, as the kernel
   can DMA directly between the device and the VDR buffer.

*  It increases the performance of the entire system, by eliminating
   the overhead of moving gigabytes of data in and out of the cache
   needlessly and by keeping the cache memory available for useful data.

Carsten.
I don't believe this will work so easily. As said in the man page: "In general this will degrade performance"

Direct means it goes directly to the disk. When you record 2 or more streams, or want playback while recording (time shift), then the disc heads will jump between the positions for every read/wrtie access (synchronous, unbuffered). To get performance you need to implement a smart readahead variant for playback and a "huge" buffer for recording, so it has a lot of data collected before a write access is done.

When I look at my HDD LED I see that it is off for long periods, even when recording/playing multiple streams. This is quite effective and gives a good performance, if it would just free the cache buffers afterwards...

So I think a kind of I/O subsystem must be implemented that suites our needs, i.e.
Playback:
- random access to every octet in the stream translating it to the required buffer(s),
- a limited cache of a few minutes or less (sometimes you skip back to replay a szene, e.g. when a phone call interrupts you, or you want to enjoy the last goal of your favorite soccer team in slow motion ;-)).
- a "big" readahead buffer that minimizes the read accesses while fetching "new" data
Record:
- a minimum write-section size. Probably we would need a bigger ring buffer for this (?)

Any more requirements?

Andreas



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index