On 28/08/2020 23:40, Ram Ramesh wrote:
On 8/28/20 5:12 PM, antlists wrote:
On 28/08/2020 18:25, Ram Ramesh wrote:
I am mainly looking for IOP improvement as I want to use this RAID in
mythtv environment. So multiple threads will be active and I expect
cache to help with random access IOPs.
???
Caching will only help in a read-after-write scenario, or a
read-several-times scenario.
I'm guessing mythtv means it's a film server? Can ALL your films (or
at least your favourite "watch again and again" ones) fit in the
cache? If you watch a lot of films, chances are you'll read it from
disk (no advantage from the cache), and by the time you watch it again
it will have been evicted so you'll have to read it again.
The other time cache may be useful, is if you're recording one thing
and watching another. That way, the writes can stall in cache as you
prioritise reading.
Think about what is actually happening at the i/o level, and will
cache help?
Cheers,
Wol
Mythtv is a sever client DVR system. I have a client next to each of my
TVs and one backend with large disk (this will have RAID with cache). At
any time many clients will be accessing different programs and any
scheduled recording will also be going on in parallel. So you will see a
lot of seeks, but still all will be based on limited threads (I only
have 3 TVs and may be one other PC acting as a client) So lots of IOs,
mostly sequential, across small number of threads. I think most cache
algorithms should be able to benefit from random access to blocks in SSD.
Do you see any flaws in my argument?
I don't think you've understood mine. Doesn't matter what the cache
algorithm is, the whole point of caching is that - when reading - it is
only a benefit if the different threads are reading THE SAME bits of
disk. So if your 3 TVs and the PC are accessing different tv programs,
caching won't be much use, as all the reads will be cache misses.
As for writing, caching can let you prioritise reading so you don't get
stutter while watching. And it'll speed things up if you watch while
recording.
But basically, caching will really only benefit you if (a) your cache is
large enough to hold all your favourite films so they don't get evicted
from cache, or (b) you're in the habit of watching while recording, or
(c) two or more tvs are in the habit of watching the same program.
The question is not "how many simultaneous threads do I have?", but "how
many of my disk i/os are going to be cache misses?" Your argument
actively avoids that question. I suspect the answer is "most of them".
Cheers,
Wol