Wifi Performance

From WikiDLXTV
Jump to: navigation, search

What to do when you aren't happy with the stuttering of your movies!

NFS vs SMB vs FTP vs SSH speed test (by choekstr)

Quote

choekstr: I recently decided to try to get my high bitrate files to stop stuttering, something many people are perpetually searching to accomplish. 3 wifi dongles later I realized I was only going to get so much transfer rate using 802.11N at the distance the client is from the Access Point. One of the issues is we default to using SMB aka CIFS aka Windows file sharing for convenience. It really is just an inefficient protocol.

The connected rate I am seeing at distance is 135Mb/s out of a theoretical max of 300Mb/s. here is what iwconfig shows: Code:

ra0      RT2870 Wireless  ESSID:"PimpLair_N"  Nickname:"RT2870STA"
         Mode:Managed  Frequency:5.26GHz  Access Point: 00:1E:E5:9D:71:1A  
         Bit Rate=135Mb/s   
         RTS thr:off   Fragment thr:off

So using my fastest adapter I wanted to start tweaking the settings test the various protocols that mount would support and find the best transfer speeds I could find. Since I couldn't find iperf compiled for the WDTV Live, I wrote a bandwidth test script to repeatedly transfer a file and show the average bitrate. The test methodology is transfer a file 10 times, calculate the transfer speed for each pass, and then calculate the average transfer rate for 10 times. Then do the 10 pass test once again to re-validate the results. I was shocked at the speed differences the choice in protocol makes!

NFS is by far the fastest at ~73Mb/sec!


Then comes FTP protocol using FTPfs mounting:


Almost but not quite last is our beloved/hated SMB using SMBfs:


And slowest of all is the SSH method using SSHfs (cpu limited):


Because NFS was so radically higher (I expected around 30% faster) I re-ran the NFS test at the end and came up with the same results:


Now realize the bitrates of movies vary from around 1Mb/sec for low-end SD content, to around 4-8Mb/sec for 720p movies. It gets interesting when you start ripping BluRay movies at 1080p. Most of the files you encounter and download on the Internet at 1080p are up to 12Mb/sec. When people archive their own Rips it isn't uncommon to see bitrates as high as 20-45Mb/sec. This is why many people have a hard time transferring large 1080p movies over wireless. The bitrates just aren't there to transfer that much content!

I can safely say that my largest movie is a self rip of Twilight at 30.880Mb/sec (finally checked instead of guessing) and weighing in at a whopping 27GB filesize and I could never transfer it without it stuttering at some point. I finally got NFS working properly and now it is as smooth as butter. a 30.880Mb/sec movie hardly taxes my wifi card using NFS at 73Mb/sec. Take that massive movies!

So if you are struggling with transfer rates and always wondered if switching to a different protocol would help, here is a pretty good test that will help determine if it will. NOTE: Mounting a SMB share via net.mounts or manually using xmounts WILL NOT do anything for speed over what the built-in automatic method you use in the OSD.

Enjoy and discuss.

P.S.: detailed methodology, scripts, and wifi cards used were left out of this write-up for brevity sake but if you care, just ask. bandwidth_test script is now attached to post.

Original Link (Forum stopped working sometime Jan 2010)

Until a full write-up, check out NFS vs SMB vs FTP vs SSH speed test (by choekstr)


Windows workaround if NFS does not work or you do not want to install an additional server

In my situation I could get the NFS server installed and the export mounted, but when I would try and play files they would freeze stuck and I was having problems. So what I tried instead was using the Media Sharing option through Windows Media Player. It seems that this approach transfers the data using a different method than SMB. In my case, I was having stuttering when playing files through SMB over my wireless bridge. If I hardwired the device, the stuttering went away. Even though through the wireless bridge the bandwidth is there, it seems that the overhead using SMB is so huge that the video stutters.

Then finally I tried Media Sharing through Windows Media Player and it must use a different technique because the data flow is very smooth, and absolutely no stuttering. The image below shows the three examples on bytes/sec sent from my PC (the scale is a little off, all the values are in the neighbourhood of 2.5 MB/s - 5 MB/s):

Image 1: 24 Mbps file over wireless bridge using SMB

Image 2: 24 Mbps file over hardwired connection using SMB

Image 3: 24 Mbps file over wireless bridge using WMP Media Sharing

Various network streaming options

I think the difference is substantial, and instead of installing NFS it may be worth it for those running Windows to simply use Media Sharing. I was not really a fan of the media sharing before but it helps me avoid installing the NFS option. Also the other reason I was initially stumped is because I could transfer files from my PC to the WDTV live using explorer at about 7 MB/s, so why a 3 MB/s file would stutter was beyond me. That's when the guys in the IRC channel told me about SMB slowing it down.