Windows 7 x86 poor SMB Performance

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sharza Offline
Junior Member
Posts: 12
Joined: Mar 2012
Reputation: 0
Post: #1
Hi

Im new to this forum so please forgive if this has been answered. I've searched but came up with no usefull results. Im pretty new to XBMC as well so there might be some things I've missed out on.

I've got a Windows Server 2008 R2 SP1 host running my file shares, and it sits on a gigabit port, delivering in excess of 600 Mbps (measured using IPerf) to other gigabit hosts. I've put XBMC on my laptop, which is a fair lenovo thing, not top notch, however it's been playing anything I've got using VLC or Media Player classic so far. It's only on a 100 Mbit nic, but measures 90 Mbps + on every test to the server. This should be plenty for playing any HD content one could possibly throw at it, however for some reason high bitrate movies seems to cause me trouble when playing them through XBMC.

Playback itself is fine, however every minute or so XBMC needs to rebuffer. Looking into the debug log which can be found at http://pastebin.com/VLx3EdJu it seems both that XBMC works in the background gathering thumbnails and that the video requires some re-syncs during playback, I cannot tell wether this is normal behavior or not, however when I analyse the network usage characteristiscs and compare it to when VLC plays backs, XBMC does not put a constant load on the network connection, but jumps up and down erratically, where VLC constantly loads the network connection varying in bandwidth consumption.

The laptop is fitted with 4 GB memory. At no time is the CPU load above 40% and Memory consumption above 60%

From the debug log:
Starting XBMC (11.0-RC2 Git:20120229-f38655f), Platform: Windows 7, 32-bit Service Pack 1 build 7601. Built on Feb 29 2012 (compiler 1600)
Intel® Core™2 Duo CPU T6600 @ 2.20GHz
Desktop Resolution: 1366x768 32Bit at 60Hz <-- This will also be output through HDMI to a Samsung 1080p display, however its not the gfx performance which gives me trouble here.
Running with administrator rights
Aero is enabled

MediaInfo can be found here: http://pastebin.com/RRMr0GjY

The way XBMC addresses SMB paths make me suspect that it uses its own SMB implementation and not the native MS API's, however that is pure speculation of course. The reason why this is interesting to me, is I've seen production issues with applications using non standard SMB libraries in the past.

Measuring remote to local file transfers I am hitting the roof at low enough transfer speeds to give me trouble at 40 MBps... however that is because the local disk in the laptop isn't exactly porsche style, but for that to give any issues with playback would require XBMC to do local caching, which I assume is not the case.

I am running XBMC in portable mode, and its linked to a MySQL database also hosted on the Win2k8 R2 machine. It does however not make any difference if I use a local installation running in non-portable mode and not using MySQL.

Can anyone give me some pointers as to why I see this issue? This is not the only movie btw.

Thanks in advance.

- Sharza
find quote
live4ever Offline
Fan
Posts: 556
Joined: Sep 2006
Reputation: 3
Post: #2
What if you map the drives on the laptop then add the source as a local drive (bypassing XBMC's smb)?

-Also try turning off thumbnail extraction in video settings.
-Use IP address for Win2k8 server in 'add network location' instead of 'media'
find quote
sharza Offline
Junior Member
Posts: 12
Joined: Mar 2012
Reputation: 0
Post: #3
(2012-03-20 17:05)live4ever Wrote:  What if you map the drives on the laptop then add the source as a local drive (bypassing XBMC's smb)?

-Also try turning off thumbnail extraction in video settings.
-Use IP address for Win2k8 server in 'add network location' instead of 'media'

I will try local map and thumbnail extraction as soon as I come home, just to see.

I already use the IP address for the server, the share name is "media" as well as the account.

- Sharza
find quote
WiSo Offline
Team-XBMC Developer
Posts: 2,484
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #4
(2012-03-20 15:18)sharza Wrote:  The way XBMC addresses SMB paths make me suspect that it uses its own SMB implementation and not the native MS API's, however that is pure speculation of course. The reason why this is interesting to me, is I've seen production issues with applications using non standard SMB libraries in the past.

XBMC uses the native MS API's to access smb shares. The url path scheme is corss platform compatible and we just rewrite it to MS paths in the designated class.
How XBMC caches the network traffic is something our dvdplayer gurus have to answer.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
sharza Offline
Junior Member
Posts: 12
Joined: Mar 2012
Reputation: 0
Post: #5
(2012-03-20 22:20)WiSo Wrote:  XBMC uses the native MS API's to access smb shares. The url path scheme is corss platform compatible and we just rewrite it to MS paths in the designated class.
How XBMC caches the network traffic is something our dvdplayer gurus have to answer.
T
Sounds good, that is one less thing to consider. That _should_ be proven when I attempt to play the file through a locally mapped unc path later on.

Wonder if the caching method should have anything to do with that. I've tried to increase the cache mem buffers setting in the advancedsettings.xml file, however that didn't really change anything, except there was an indeterminate amount of increased time between rebuffering (have to admit I didn't time it with different settings, I might try that if it becomes truly relevant later on).
find quote
Livin Offline
Posting Freak
Posts: 3,433
Joined: May 2004
Reputation: 17
Location: above ground
Post: #6
I had the exact same issue a while ago - it turned out to be a bad cable end. I re-terminated the cable and the problem was resolved. In the process I found that switches can act very different. One switch the cable did not work at all (showed no connection), another older, higher-powered switch made the connection... I assume because of the higher power output.

I'm not an expert but I play one at work.
find quote
sharza Offline
Junior Member
Posts: 12
Joined: Mar 2012
Reputation: 0
Post: #7
Its not the cable. It clocks at 90 Mbps ++ in any measurement. Wireshark shows no retransmits, and just to make sure I swapped the cable as well.

I tried playing the file of a locally mapped UNC path, and the results was the same. As earlier mentioned the hard drive in the laptop is a slowbie 4200 rpm thing, which at its best delivers around 7 MB/s read speeds, but it varies alot and mostly is between 3 - 5 MB/s. This is more than 50% below the actual performance I get over the 100 MBps network link. Just for the fun of it I copied the movie to the local drive, and for some reason it plays flawlessly there, no rebuffering at all ... this puzzles me alot, as theoretically the slow drive should prove a challenge, considering the max bitrate in the movie is 40 Mbps, and the drive read speeds is unable to deliver that much data most of the time (I know that 40 Mbps is peak as its vbr, but in heavy action scenes we should be around that value.). So why is it that the network link which provides more than double the performance transfer wise is suffering?? That is just plain weird.

I cant help thinking it must be the way XBMC accesses the file over SMB, since its the only media player suffering from this (compared to Windows Media Player, Media Player Classic and VLC). I am also thinking of those warnings in the debug log... they may be significant in this matter.
find quote
kedda Offline
Senior Member
Posts: 133
Joined: Feb 2011
Reputation: 0
Post: #8
sharza, I agree with your last post. something is awry with SMB access via XBMC. I have found smb to be unusable on high bitrate files and have had to resort to ftp.

(2012-03-21 15:46)sharza Wrote:  ....
I cant help thinking it must be the way XBMC accesses the file over SMB, since its the only media player suffering from this (compared to Windows Media Player, Media Player Classic and VLC). I am also thinking of those warnings in the debug log... they may be significant in this matter.
...
find quote
sharza Offline
Junior Member
Posts: 12
Joined: Mar 2012
Reputation: 0
Post: #9
(2012-03-21 16:00)kedda Wrote:  sharza, I agree with your last post. something is awry with SMB access via XBMC. I have found smb to be unusable on high bitrate files and have had to resort to ftp.

So did FTP resolve the issue, and more importantly is FTP configured in the same manner as SMB (so that it will be universally accessible on the network, given I use a centralized MySQL library and server).

I could easily enable the access via FTP, as that is already in place however not serving access to media files.
find quote
vexation Offline
Senior Member
Posts: 154
Joined: Jul 2009
Reputation: 1
Post: #10
Have you tried completely removing the cachemembuffersize from your advancedsettings.xml? It shouldn't be necessary at all.

What NIC chipset have you got on the Lenovo? Realtek?

Finally, you REALLY shouldn't have to considering you're on 2008 R2 SP1 and Windows 7 SP1 but you could try disabling SMB2 on the server. It's a simple test that can be fairly quickly turned off and on.

Regedit.. go to HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters
Add a new REG_DWORD key with the name of "Smb2" (without quotation mark) and give it a value of 0.
0 = disabled
1 = enabled
Reboot. If it doesn't make a difference just delete the key and reboot again.

It'd be interesting to see whether it makes a difference but it really shouldn't (I have a very similar setup to you and didn't need to disable SMB2)
find quote
Post Reply