mattlach
Patron
- Joined
- Oct 14, 2012
- Messages
- 280
Hey all,
I was hoping someone might give me some guidance on how to optimize settings for use in this environment.
Setup:
FreeNAS and my MythTV backend are directly connected on a separate subnet. File sharing happens via NFS.
My FreeNAS backend has an 8 drive RaidZ2 volume.
What works:
The MythTV backend can write 6 mpeg2 streams (the limit of my tuner) to the FreeNAS volume just fine. (these streams are up to 18mbit) without a problem, at the same time as clients are playing OTHER files from the volume. So i know there is plenty of performance there to handle my workload.
What Doesn't:
The problem arises when I try to view a recording at the same time it is being recorded. MythTV does this for all live recordings (write file to disk, create a couple of second buffer, play same file from disk to clients) and is how it supports pause, fast forward, etc. operations.
I know the system has plenty of performance to do the reads and writes that I need, but the NFS/ZFS combo is somehow getting hung up when any given file is being simultaneously read from and written to, occasionally (every 15 minutes or so) freezing up for a second or two, before continuing. (sometimes this is enough to cause the frontend to time out while playing)
What I've Tried
1.) Having a separate local SSD in the mythbuntu backend for liveTV recordings, and only pushing scheduled recordings to FreeNAS.
This works reasonably well, except for when a scheduled recording is started to FreeNAS, and I want to watch it until I catch up to live. (this is usually the case for sports, like the World Cup recently)
2.) Using a local SSD on mythbuntu together with cachefilesd/CacheFS and mounting the NFS share with the FSC option to cache it
I had hoped this would solve the issue, such that reads and writes to recent/inprocess recordings would all come off of the fast 60GB partition on the SSD, but for whatever reason this has the same problem when reading/writing to the same file at the same time, as going directly to NFS.
So I am suspecting there is something with the NFS/ZFS combo regarding how files are locked out, or how caches are committed to disk that is causing this problem. Either it has to do with my configuration, or it is innate with the protocols.
If it is configuration based, I'm hoping someone with experience optimizing these things might give me some pointers. :)
Server specs in sig.
Current configuration:
link: virtual 10gig ethernet. (tops out at ~4Gbit using iperf in practice)
Server NFS settings set up to share 100 servers (to make sure I don't run out)
Client NFS settings mounting using following options: "rsize=8192,wsize=8192,timeo=14,intr,fsc,rw,user"
Maybe different block sizes or something might help?
Appreciate any thoughts / suggestions :)
I was hoping someone might give me some guidance on how to optimize settings for use in this environment.
Setup:
FreeNAS and my MythTV backend are directly connected on a separate subnet. File sharing happens via NFS.
My FreeNAS backend has an 8 drive RaidZ2 volume.
What works:
The MythTV backend can write 6 mpeg2 streams (the limit of my tuner) to the FreeNAS volume just fine. (these streams are up to 18mbit) without a problem, at the same time as clients are playing OTHER files from the volume. So i know there is plenty of performance there to handle my workload.
What Doesn't:
The problem arises when I try to view a recording at the same time it is being recorded. MythTV does this for all live recordings (write file to disk, create a couple of second buffer, play same file from disk to clients) and is how it supports pause, fast forward, etc. operations.
I know the system has plenty of performance to do the reads and writes that I need, but the NFS/ZFS combo is somehow getting hung up when any given file is being simultaneously read from and written to, occasionally (every 15 minutes or so) freezing up for a second or two, before continuing. (sometimes this is enough to cause the frontend to time out while playing)
What I've Tried
1.) Having a separate local SSD in the mythbuntu backend for liveTV recordings, and only pushing scheduled recordings to FreeNAS.
This works reasonably well, except for when a scheduled recording is started to FreeNAS, and I want to watch it until I catch up to live. (this is usually the case for sports, like the World Cup recently)
2.) Using a local SSD on mythbuntu together with cachefilesd/CacheFS and mounting the NFS share with the FSC option to cache it
I had hoped this would solve the issue, such that reads and writes to recent/inprocess recordings would all come off of the fast 60GB partition on the SSD, but for whatever reason this has the same problem when reading/writing to the same file at the same time, as going directly to NFS.
So I am suspecting there is something with the NFS/ZFS combo regarding how files are locked out, or how caches are committed to disk that is causing this problem. Either it has to do with my configuration, or it is innate with the protocols.
If it is configuration based, I'm hoping someone with experience optimizing these things might give me some pointers. :)
Server specs in sig.
Current configuration:
link: virtual 10gig ethernet. (tops out at ~4Gbit using iperf in practice)
Server NFS settings set up to share 100 servers (to make sure I don't run out)
Client NFS settings mounting using following options: "rsize=8192,wsize=8192,timeo=14,intr,fsc,rw,user"
Maybe different block sizes or something might help?
Appreciate any thoughts / suggestions :)