[mythtv-users] Test drives with hdparm
Simon Hobson
linux at thehobsons.co.uk
Fri Aug 12 12:30:16 UTC 2011
David Watkins wrote:
>I thought the consensus was that they should be on different drives
>for best performance?
>
>I have half my recordings on the same drive as the database and have
>never noticed any differences between these and those on the other
>drive, which is dedicated to recordings only.
It will make a difference if you are anywhere close to the limit.
The problem is that in general it will be seek performance that
limits throughput, not streaming rate. If you are recording several
streams, commflagging recordings, and then fire up a database process
that does a load of random read/write at the other end of the disk
then you're going to have a fair impact on what the other stuff is
doing.
I would welcome input from someone who knows about the internals here ...
A while ago I think someone said that the recording code does regular
fsyncs on the file it's recording. If so, then that would make sense
as you don't really want to build up a huge dirty buffer and then
kill everything when it gets written out in a big chunk.
However, and this is where knowledgeable input would be useful. AIUI,
when the program does a sync, it's going to block - or can it ask for
a sync and then leave that to carry on while it gets on with it's own
thing ?
Before I upgraded, it was noticeable that when I had problems, it was
almost always in the recording - not the playback. This leads me to
suspect that when the code syncs, it is then blocked and if the disk
is busy thrashing around to serve other requests, then the code gets
held up, buffers overflow in the hardware, and bits are missing from
the recording. The result is the stuttering and blocky playback
characteristic of a poor DVB signal.
Given a machine with sufficient RAM, then as long as the code doesn't
actively block itself by waiting for syncs to complete, then in-RAM
buffering should allow it to ride out even quite large delays. After
all, a DVB multiplex is 10 to 20Mbps, and an individual SD program
only 1-4Mbps. At 2-3GByte/hour, a 1G buffer could hold at least 20
minutes worth of recording - far longer than any interruption from a
DB update is likely to last.
It would seem that given enough RAM, disk performance becomes far
less important - though you might need to increase playback buffers
(and hence pre-playback pause) as well.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the mythtv-users
mailing list