video playing over samba patchy and choppy

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

video playing over samba patchy and choppy

Postby fanyangto » Mon Aug 18, 2014 3:11 am

I was over exited when receiving the Pogo Series 4 device. ALARM Linux was quickly install with samba.
I have attached a USB hard drive formatted as ext3.

Basic benchmark is done. Reading a 10GB file over samba the speed is 26MB/s. Writing a 10GB file is 15MB/s. I have utilized some recommended smb.conf. The speed may not be optimal, but it should be way faster than necessary to stream any HD video (8GB video only requires 2MB/s streaming capability, and my tomatoUSB route NAS can even do that).

But on a different machine connected by the gigabit network, when I actually play videos stored on the drive over samba, the video shows mosaic and patchy patterns. This is consistent across may different scenarios:

1. Windows Media Center playing recorded 1 hour HD TV (7GB).
2. XBMC (v13) playing a 8GB MKV file.
3. XBMC and Windows Media center playing the same files from a locally mapped drive
4. Using the gigabit network, or change the switch to a different one, or play over Wifi (my wifi can handle HD play), to eliminate the network.
5. Tried different laptops (3 different machines with win7, different OS images) to elimnate NIC or NIC driver issues.
6. Tried different hard drives (on ext3 as well as NTFS with big_writes option), same behaivor.

It seems that the only possibility/culprit remain is the ALARM Linux + samba itself.

I am at a loss at this point. Given so many people are using Pogo Series 4 as a samba server. Does any one have successfully played HD videoes over samba? (8GB or more). What's shocking was that I was able to play HD videos stored on my tomatoUSB NAS (which is only capable of delivering 7MB/s).

BTW, when I play smaller video files (1GB or so), there is no issue. Only large HD video files (7-8GB), I run into mosaic/patchy video play.

Finger crossed that someone can at least confirm HD video play over samba on this device well!

Thanks!
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: video playing over samba patchy and choppy

Postby moonman » Mon Aug 18, 2014 5:12 am

I do it all the time, and have had no problems even with straight bdrips (over 20 gb?] I dont have series4 but that shouldn't matter. Watch cpu and ram usage with htop.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: video playing over samba patchy and choppy

Postby fanyangto » Mon Aug 18, 2014 9:50 am

Thanks for the reply. I believe you as I was able to play the same video from a samba share out of a open source router. The router was far less capable (8MB/s max, but while playing, only 2MB/s bandwidth is required).

Here is the vmstat out put during the video play. You see the system is 80% idle and memory is fine too.

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 1892 13252 74876 0 0 2394 0 1574 432 2 21 77 1 0
1 0 0 2116 12932 74888 0 0 1971 4 1247 356 1 17 82 0 0
0 0 0 2480 3052 84520 0 0 1946 0 1311 354 1 17 82 0 0
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: video playing over samba patchy and choppy

Postby fanyangto » Mon Aug 18, 2014 10:10 am

Hmm, always going back to the basics, that's my motto when troubleshooting.

I started to eliminate the smb.conf lines to some default. It looks like the following optimization (per various posts to improve file transfer performance) have caused the problem. esp the socket_option. After elminate all lines below except the socket_options, Windows Media Center plays video flawlessly. But XBMC still shows patches occasionally. But after elminating socket_options, the XBMC rarely shows patches any more.

Looks like I didn't know what i was doing.

But this really piques my interest about these parameters. I wonder if you could share your smb.conf section as a baseline to compare? Thanks!

# Fix for file batch copy issues (see: viewtopic.php?f=18&t=4864)
# oplocks = no

# Some Tuning (See Optimize Performance)
# socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# write cache size = 8192
# this decreases read CPU load
# use sendfile = true
#getwd cache = yes
# min receivefile size = 16384
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: video playing over samba patchy and choppy

Postby fanyangto » Mon Aug 18, 2014 10:57 am

Further investigation has yield the following:

1. "use sendfile" = true

This has caused WMC to play videos with stripes of mosaic quite frequently. Eliminate this line alone resolved all WMC video play problems.

2. socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192

TCP_NODELAY IPTOS_LOWDELAY are not the problem. SO_RCVBUF=8192 SO_SNDBUF=8192 cause XBMC to play large videos (8GB DVD quality video) to cause big patches of mosaic all the time. Removing the buffer size the problem is gone.

-

Now what does this mean? We have to choose between file transfer performance vs. video play quality ? ;-)
fanyangto
 
Posts: 13
Joined: Mon Aug 18, 2014 2:17 am

Re: video playing over samba patchy and choppy

Postby WarheadsSE » Mon Aug 18, 2014 2:00 pm

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 11 guests