Choppy video playback on WD TV Live media player

Status
Not open for further replies.

Lefty

Cadet
Joined
Dec 21, 2012
Messages
3
I'm new to using FreeNAS. I used to run a simple Linux box with SAMBA and for a few other purposes. That box died a while back (it was quite old), so I decided to build a new system (on a budget) to take its place. I also bought a WD TV Live media player that I found on sale, which I like to use to play network-stored DVDs.

Since I didn't need a lot of the other features of a full Linux system anymore, I decided to give FreeNAS a shot. In general, I'm pretty glad I made the choice. Setup was very easy, and the performance seems very good, even with fairly low-end/consumer hardware.

The problem I've found is that there is some weird latency or buffering problem somewhere between my new NAS system and the media player. The (non-HD) movies play ok for a second or two, and then get choppy and stay that way indefinitely. The only way I've found to avoid this, is to connect the NAS box to a 10/100 ethernet switch instead of using GbE.

I've searched to forum for other similar problems, but haven't found a match. I did see the posts about long browse times with CIFS, and tried some of those suggestions, but I don't think I'm suffering from the same issue. Performance in terms of bandwidth seems very good -- when copying files to/from a Windows7 machine (also with GbE), I can read from the NAS at speeds of 80+MBytes/s and write to it up to ~70MBytes/s.

My temporary solution to the video problem is to simply put the NAS onto a 100Mbps link. This works fine for me for daily stuff, like watching movies and grabbing a file or two, but is a shame when I'm doing larger larger transfers such as backups.

Has anyone seen anything similar? I'd appreciate any suggestions that would allow me to use gigabit ethernet and watch movies on my existing media player -- I'd even sacrifice a little speed at the high end as a compromise.

NAS System:
- FreeNAS-8.3.0-RELEASE-p1-x64 (r12825)
- Boots from 8GB USB thumbdrive on a USB 2.0 port
- Intel Pentium G630 (Dual-core, 2.7GHz Sandy Bridge)
- 2x4 GB DDR3 RAM
- Realtek 10/100/1000 LAN (integrated on motherboard)
- 160GB Seagate SATA HDD
- 2TB WD SATA HDD
- Both drives formatted as ZFS, shared using CIFS (local user access)

Purposes:
- Supply video and audio files to a WDTVLive media player
- Serve as a global storage device for the various PCs and devices in the house
- Provide a place to backup the various devices in the house

Network Connections (simplified)
. +--------------+ +--------------------------+
. | 10/100 Switch| | GbE Switch |
. | Wireless Rtr | | |
. +--^--^--^--^--+ +--^--^--^--^--^--^--^--^--+
. | |_____________| | |
. | | |____________ Win7PC(GbE)
. | |
. WDTVLive NAS(GbE)


(sorry, the ascii diagram isn't lining up, even with a fixed-width font)


Setup #1: NAS stores DVD movie files, accessed by WDTVLive (using CIFS).
Results ==> WDTVLive playback of movies is very choppy after a 2-3 seconds.
Transfer of files between NAS and Win7PC is very respectable (65-80 MB/s, as reported by Win7).
Playback of same NAS movie files on an older laptop connected to the 10/100 switch is flawless.

Setup #2: NAS stores DVD movie files, accessed by WDTVLive (using NFS).
Results ==> WDTVLive playback of movies is very choppy after a 2-3 seconds.

Setup #3: NAS stores DVD movie files, accessed by WDTVLive (using CIFS).
Network connection for NAS moved from GbE switch to 10/100 switch.
Results ==> WDTVLive plays movies flawlessly.

Setup #4: Win7PC stores DVD movie files, accessed by WDTVLive (using windows shares).
Results ==> WDTVLive plays movies flawlessly.



- It isn't strictly CIFS performance, shown by the result in Scenario #2.
- It's not a simple network bandwidth issue or gross malfunction/wiring problem
- It appears that the NAS can keep up fine -- no drive or CPU/RAM bottlenecks
- If latency is an issue, maybe the laptop in Setup #1 is making up for this by buffering?


What I've tried, with no luck fixing the choppy video playback issue:
- Used both UFS and ZFS formats
- Various permutations of the CIFS service options -- async IO, DOS attributes, large RW, etc.
- Use of some CIFS auxiliary parameters, as suggested in some of the other forum threads:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=2097152 SO_SNDBUF=2097152
read raw = yes
write raw = yes
max xmit = 65535
getwd cache = yes
- Making sure packet size is set to default/non-jumbo (mtu 1500)
- Turned on tuning

Thanks
/Lefty
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd reset your CIFS settings to the default. The default is the default because it should give you good performance, reliability, and stability. The autotune can stay on. I've seen no problems from using it, but I've seen some problems solved by using it. One you get everything working the way it should be THEN you can start tweaking. I never start tweaking, especially when stuff isn't working right.

The fact that if you plug into a different switch the problem goes away tells me that the problem is being bypassed by changing your switch. I'd see if you can beg or borrow a switch from a friend and try to figure out if there is something with the Gb switch that isn't working right with the WDTV. It could be a large number of packets are being corrupted which are simply being retransmitted by the Windows and FreeNAS machine but the underpowered WDTV is having a hard time processing all the bad packets and trying to separate them. This looks to me like it likely is a hardware issue, so I'd try there.

Good detective work trying to fix the problem.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
figure out if there is something with the Gb switch that isn't working right with the WDTV. It could be a large number of packets are being corrupted which are simply being retransmitted by the Windows and FreeNAS machine but the underpowered WDTV is having a hard time processing all the bad packets and trying to separate them.

My guess is it's a gigabit switch that sucks at simultaneously handling 100mbit connections. The WDTV only has a 10/100 NIC, while his Windows machine obviously has a 10/100/1000 NIC (else he wouldn't be seeing 65-80 MB/s).

Replace the switch with something of quality, like a Netgear ProSafe unmanaged gigabit switch.
 

Lefty

Cadet
Joined
Dec 21, 2012
Messages
3
I hadn't really considered the gigabit switch having a problem with 10/100 connections. That seemed to be in the clear based on my setup #4 with a Windows7 machine hosting the files through the same switch, but maybe there is still something there. I've attached a picture of the ascii drawing I couldn't get to display correctly in my original post:

network.JPG

And, yes, my trials with CIFS settings were out of desperation. I did use some settings that apparently were working well for someone else, rather than blindly guessing. I have been back to the default values, as they do seem to give me the best performance between the NAS and my Win7 machine.

For now, I have NAS box connected to the 10/100 switch, which has been working very well for video playback. When I have some more down time, I'll play around some more and look into alternate hardware to see if that makes any difference.
 

Lefty

Cadet
Joined
Dec 21, 2012
Messages
3
Problem solved!

I had tried a couple of borrowed GbE switches and made sure to use known good cables, with no luck whatsoever. Since my Windows7 machine served up movies nicely over it's gigabit connection using the same network resources, I suspected the integrated ethernet controller in my FreeNAS box (mb is Gigabyte GA-H61M-D2).

After a google search of something like "freenase GA-H61M wd live tv", I found another post here on this forum (that I couldn't find using a search here :(), I found this thread:

http://forums.freenas.org/showthread.php?5698-Streaming-Issues-to-WDTV-Live-Is-the-problem-4K-(AF)-Sectors-Totally-confused

Although the topic starts out with suspicions about RAID and sector sizes, the basic symptom was described the same. After reading through the thread, the problem turned out to be the integrated ethernet controller on the GA-H61M motherboard. In that person's case, a replacement NIC did the trick.

I went ahead and ordered a $30 Intel GbE NIC from Newegg, and installed it as soon as it came (Took maybe 15 minutes altogether -- Kudos to the FreeNAS team for making the software setup very easy). I'm now able to stay connected to my network at gigabit speeds and watch media over the same connection. I then had an excuse to spend most of a rainy Saturday watching movies -- I mean testing ;)

/Lefty
 
Status
Not open for further replies.
Top