[mythtv] ringbuffer.cpp
Jean-Yves Avenard
jyavenard at gmail.com
Thu Feb 20 03:48:12 UTC 2014
On 20 February 2014 13:31, Jonas Arndt <jonas.arndt at thearndtfamily.com> wrote:
>
> Then on the backend
> Feb 19 17:54:45 howarddvr mythbackend: mythbackend[22423]: I ProcessRequest
> ringbuffer.cpp:1114 (WaitForAvail)
> RingBuf(/data1/Recordings/2655_20140220004933.mpg): Waited 1.0 seconds for
> data #012#011#011#011to become available... 246168 < 360448
> thread:139843287852800
> Feb 19 17:54:46 howarddvr mythbackend: mythbackend[22423]: I ProcessRequest
> ringbuffer.cpp:1114 (WaitForAvail)
> RingBuf(/data1/Recordings/2655_20140220004933.mpg): Waited 2.0 seconds for
> data #012#011#011#011to become available... 246168 < 360448
> thread:139843287852800
> Feb 19 17:57:21 howarddvr mythbackend: mythbackend[22423]: I TVRecEvent
> tv_rec.cpp:1050 (HandleStateChange) TVRec[5]: Changing from WatchingLiveTV
> to None
>
> What's interesting here is that there is nothing really spectacular going on
> on the backend. Just the regular "Waited 2.0 second..." which my front-end
> has no problem surviving.
best to guess what's going on would be to run the backend with the extra option:
-v file --loglevel=debug
the logs are going to be extremely verbose, I suggest you comment in
mythtv/libs/libmythbase/threadedfilewriter.cpp
line 291 at the end of the ThreadedFileWriter::Write() function, comment
the line:
LOG(VB_FILE, LOG_DEBUG, LOC + QString("Write(*, %1) total %2 cnt %3")
.arg(count,4).arg(totalBufferUse).arg(writeBuffers.size()));
change it to:
// LOG(VB_FILE, LOG_DEBUG, LOC + QString("Write(*, %1) total %2 cnt %3")
// .arg(count,4).arg(totalBufferUse).arg(writeBuffers.size()));
that will reduce the verbosity by about 90% as that log is displayed
whenever you write 188 bytes to disk (but will still very verbose).
After that, run some basic disk speed test:
dd if=/dev/zero of=/data1/Recordings/test.mpg bs=64k count=1M
that will write 64gig on your disk and report the writing speed
then do the opposite:
dd if=/data1/Recordings/test.mpg of=/dev/null bs=64k count=1M
that will read the 64gig and report the reading speed.
will take over 10 minutes on a disk sustaining 100MB/s
I'll push some unit test that report the reading and writing speed
using the existing mythtv buffer class.
More information about the mythtv-dev
mailing list