Playback / Performance issue with MacOS record engine 20210227

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

I would like to report an issue I'm experiencing with the 20210227 MacOS record engine where live channels are buffering. I rolled back the record engine to 20210210 which resolves the issue. I don't think this was happening in the 20210224 release but I know it everything was working fine with the 0210 software so I just rolled back to that version to be sure.

If you'd like more information about my software / hardware setup, just let me know by reply.

Thanks!

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

Hi,

What disk is MacOS recording to and what filesystem is it running?

Nick

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

nickk wrote: Sun Feb 28, 2021 7:01 pm Hi,

What disk is MacOS recording to and what filesystem is it running?

Nick
Hello,

The storage is 4x 8TB external WD My Book drives configured with Apple RAID as 2x 8TB RAID1 mirrors then combined into a single 16TB HFS+ RAID10 volume.

This computer is dedicated as a file server and my HDHR record engine and It pretty much sits idle when it’s not recording or streaming live TV. I did test with the 0224 software and had the same issue but it was less frequent with only short audio dropouts.

Thanks and let me know if there are more questions.

kenchills
Posts: 11
Joined: Tue Oct 03, 2017 11:59 am

Re: Playback / Performance issue with MacOS record engine 20210227

Post by kenchills »

Could this possibly be related to the DVR playback problems we have been having on Windows since the 02/27/2021 software update?

There is another thread in the forum about recording playback problems since the 02/27/2021 update.
The symptoms seem pretty close, and are also resolved by going back to a previous version of software.

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

Not related to the problem seen on Windows (fixed internally pending release).

The 20210227 release upgrades the Mac platform to use the sendfile kernel feature which improves playback performance. The sendfile feature really needs the filesystem to be 100% kernel based.

Double checking - are the MyBook drives connected via USB? I don't think that is the problem.

How are you combining the two RAID sets into one volume?

Also what is the Device ID of your HDHomeRun?

Edit: I ran a series of tests with a normal single-drive Mac which worked perfectly for live TV. I have 4 x 4TB USB drives for setting up a test closer to what you have - can you please walk me through in more detail how I should configure these 4 drives.

Nick

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

nickk wrote: Mon Mar 01, 2021 10:37 am
Double checking - are the MyBook drives connected via USB? I don't think that is the problem.
Correct, they are USB 3 and local read / write performance is excellent.
nickk wrote: Mon Mar 01, 2021 10:37 am
How are you combining the two RAID sets into one volume?
I used Apple Disk Utility to set them up.
nickk wrote: Mon Mar 01, 2021 10:37 am Also what is the Device ID of your HDHomeRun?
It is 1080B410
nickk wrote: Mon Mar 01, 2021 10:37 am Edit: I ran a series of tests with a normal single-drive Mac which worked perfectly for live TV. I have 4 x 4TB USB drives for setting up a test closer to what you have - can you please walk me through in more detail how I should configure these 4 drives.

Nick
Thanks a bunch for the additional testing help and trying to repeat the condition! I configured them with Apple Disk Utility so it's software RAID, firstly creating the 2 RAID1 mirrors then combining those with RAID0 striping to become RAID10. Here is the help article I referenced to do it: https://support.apple.com/en-lb/guide/d ... 3150fd/mac

It's important to note that this Mac is connected through a 2000Mb power line network. My file transfer speeds across that link range from 15-20MB/s (capital B), so it should be able to handle a few 11Mb streams back and forth and I've had no prior issues.

Also, I am running OS X 10.13 on that computer (2012 Mac mini 8GB RAM core i5 duo @ ~2.4Ghz internal 500GB SSD). I watch TV from another Mac mini (a 2014 Mac mini with similar specs running Windows 10). That Mac is connected directly to the TV and to the network via a 1Gb Ethernet wired connection (powerline is only between the remote storage mini and my router)

Finally, I am using Kodi 19 and the zuki.hdhomerun.pvr 4.4.1 PVR service to watch TV. I schedule my recordings with the native HDHomeRun Mac app. I have not tested viewing performance on the HDHR native Windows app but have that installed and can temporarily update the record engine to test with it if it helps.

Best,
Vincent
Last edited by Williams on Mon Mar 01, 2021 6:02 pm, edited 1 time in total.

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

I ran a test on Big Sur with a RAID1 setup on two USB drives - that worked without issue.

I have a Mac with 10.13 but it does a screen-of-death when creating the filesystem on the RAID1 array. I will try reinstalling the OS. If that works I will try a 4-disk setup as close as I can to your setup.

In the mean-time can you please try the new 20210301 release...
1) Please very the problem still occurs (guessing it will).
2) Please add SendfileDisable=1 to the hdhomerun.conf file and test again - guessing that will fix the problem by avoiding the use of sendfile.

I still want to reproduce the problem here but this will at least get things working for you.

Nick

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

Thanks a bunch Nick I really appreciate that you're looking into this particular situation! I am feeling very much like a valued customer! :)

So I did the tests. I installed the 0301 record and played back a ~10Mb 1080i stream. Ran it for about a minute and that seemed to work OK even without the SendfileDisable enabled. I then started a recording of the same channel and the buffering started. I stopped and enabled the SendfileDisable=1 command, rebooted and tuned into a stream. Then I started a couple recordings and it started buffering to the point of freezing. I had 2 recordings and a live stream going.

So I removed the SendfileDisable setting and reverted back to the 0210 software and I am now recording 3 HD channels and streaming a 4th HD channel live with no issues. Here's a copy / paste of the tuner status as of right now. No buffering at all.

HDHomeRun CONNECT 4K
Tuner Status
Tuner 0 Channel 31.1 KDVR-DT
Tuner 1 Channel 9.1 KUSA-HD
Tuner 2 Channel 4.1 KCNC-TV
Tuner 3 Channel 6.1 KRMADT1

Please let me know what you find and I will do more tests as needed.

Thanks again!

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

I did a clean install of 10.13 on a Mac Mini and installed all updates.
Plugged 4 x 4TB WDC USB drives into the 4 USB ports.

Using the Disk Utility RAID assistant I created a RAID1 mirror with the first two drives. The RAID set was created but the system crashed (reboot with crash screen) when it got to the "waiting for raid to spin up" step.
After it booted back up I repeated the process creating a RAID 1 mirror with the second two drives. The system crashed again (reboot with crash screen).
After it booted back up I created a RAID0 of the two RAID1 sets. The system crashed again (reboot with crash screen).
After it booted back up I was able to create an APFS filesystem on the RAID10 set.
Running a First Aid check passed but then the system crashed mounting the filesystem.
It booted back up with the volume mounted.

Not convinced that a MacOS + USB + RAID is 100% solid but I will continue with setting up the DVR on this system.

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

It was quite happily recording two shows and a live TV channel, plus playing back one of the recordings and the live channel. Ran for about 5 minutes with no glitches or buffering pauses. I stopped one of the playback sessions and a few second later the system crashed and rebooted. The crash report shows it crashed in the USB kernel driver.

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

Interesting. I did not have any issues creating the RAID sets. I formatted everything as MacOS Extended (Jounaled) though. The computer is very stable and hasn't crashed ever.

Also I am not watching TV on that computer so all streams are accessed over the network. Everything works fine with the 0210 version but I would like to stay current if possible.

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

Is the problem only when playing live TV up against the live point?

ie does playing recorded content work ok, and does live TV work ok if you pause for 10 seconds then resume playing 10s behind real time?

Edit - also which client platform are you using for viewing?

Nick

Edit: I moved the 4 drive RAID10 array to a Mac Mini running 10.15 and it is working well. Running multiple recordings and multiple live TV sessions (Win10 and Android).

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

nickk wrote: Tue Mar 02, 2021 7:42 am Is the problem only when playing live TV up against the live point?

ie does playing recorded content work ok, and does live TV work ok if you pause for 10 seconds then resume playing 10s behind real time?

Edit - also which client platform are you using for viewing?

Nick

Edit: I moved the 4 drive RAID10 array to a Mac Mini running 10.15 and it is working well. Running multiple recordings and multiple live TV sessions (Win10 and Android).
The buffering exists whether I am at the live point and when pausing and viewing behind real time. Letting the stream buffer a bit to disk doesn't seem to help. I didn't try watching recorded content with the 0301 engine. My client platform is Windows 10. I use Kod 19 and the unofficial HDHR PVR 4.4.1 and everything streams through the record engine. My resource lock shows the IP address of my mini in tuner status.

I am stuck with OS 10.13 on that computer. I have some 32 bit software that has not been upgraded and is occasionally used on it. I also encountered a nasty bug with a 10.14.6 window server crash when switching refresh rates so I won't upgrade to that version even if I'm not using it with a TV / monitor. I of course did not experience the nasty crash situation with my RAID configuration that you encountered in testing.

My main comparison I guess is that 0210 works perfectly. This issue is brand new for me.

nickk
Silicondust
Posts: 16662
Joined: Tue Jan 13, 2004 9:39 am
x 82

Re: Playback / Performance issue with MacOS record engine 20210227

Post by nickk »

Would you be available sometime today to chat interactively and run some test builds?

After going over all the code diffs we are down to a couple of chunk size changes are being the most likely cause. If you can run some test builds we should be able to figure out exactly what the issue is.

Nick

Williams
Posts: 20
Joined: Mon Oct 12, 2020 8:33 pm

Re: Playback / Performance issue with MacOS record engine 20210227

Post by Williams »

Hey Nick - sure! I can multitask a bit now while I am working and can be available after 5p mountain time. I will keep this browser window open for instructions

Edit: you mention chunk sizes and remembered that the PVR settings allow those to be set. Right now I have it on Automatic but I can set anywhere from 64KiB to 4KiB. Not sure if manually setting that in the PVR might be able to confirm findings?

Post Reply