Samba - Access to root of each share extremely slow
#1
I have encountered the following problem in the last few builds:

I have all my media stored on a Windows XP NAS with standard fileshares.

Wenn I open a share via the built in Samba Client of XBMC, the access to the root directory of each share (and only the root directory!) takes about 30 seconds. Each subdirectory opens without delay. Also when I directly browse to a subdirectory (eg. when it's still open when returning to "Music" after having exited to XBMC main menu), there is no delay. But when I browse to a parent directory within the same share, which is the root of the share, the delay is here again.

Example:
My music is on //elrond/mp3s
This is mapped to the XBMC Source "nas music".
Opening "nas music": 30 seconds delay
Opening "nas music/rock" (or anything else in "nas music"): no delay
Going back from "nas music/rock" to "nas music": 30 seconds delay

This does not occur, when I map the share to a windows drive and just use the drive letter in XBMC.

I'm currently using Rev18466 in Win XP. I have tested versions up to 18738, which had the same problems (and some others too, so I reverted to 18466).

Any ideas are greatly appreciated...
Reply
#2
I have the same issue and to workaround I did two different things:

1) Mapped the fileshares to drives on my XBMC client PC
2) Used the Windows Media Connect UPnP server that's running on my fileserver

No more delay. I had no issues when I was running Atlantis 8.10 on my WinXP machine but when I "upgraded" to Windows 7 and installed the latest Jester's build I too started having this SMB problem and those were my workarounds.
Reply
#3
try disabling the windows firewall on server and client and report back. I have no idea what's blocking there and how to solve that on an app level yet.
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.
Reply
#4
yeah, ive noticed that too.

im sure my delay is more like a minute though. although i have over 300 listings in each root folder.

when browsing on trusty old xbox though, takes like a second to display the listing.

will take Wiso advise, but firewall is kinda important tool, and would rather live with the delay for now i suppose.

regards,
Dam0
Reply
#5
Disabling the firewall was the right hint, access times are now back to normal.

But I think, that XBMC doesn't behave right:
The problem comes from several tries to open port 80 on the server, which was of course blocked. I now have just added port 80 as exception to the windows firewall, which works well.

So the question is: Why does XBMC try to contact port 80 when browsing SMB?

Here is the log of the FW in my server.
XBMC: 10.19.79.2
Server: 10.19.79.10

Code:
#Version: 1.5
#Software: Microsoft Windows Firewall
#Time Format: Local
#Fields: date time action protocol src-ip dst-ip src-port dst-port size tcpflags tcpsyn tcpack tcpwin icmptype icmpcode info path

2009-03-24 10:09:27 DROP TCP 10.19.79.2 10.19.79.10 4117 80 48 S 952794112 0 65535 - - - RECEIVE
2009-03-24 10:09:30 DROP TCP 10.19.79.2 10.19.79.10 4117 80 48 S 952794112 0 65535 - - - RECEIVE
2009-03-24 10:09:36 DROP TCP 10.19.79.2 10.19.79.10 4117 80 48 S 952794112 0 65535 - - - RECEIVE
Reply
#6
I'm glad to see other people are having this issue. That's a great idea to map the share as a network drive, its not ideal, but totally viable until this gets fixed. Unless this entry on Trac mean it has been taken care of:

Changeset [18892] by wiso
[WIN32] fixes for the native SMB client

Strange enough, if you browse the SMB share from "Add Source" There is 0 delay.

I also started getting "Network not available" on some of my SMB shares. They are shares from the same server, so while some are working, others arent. Rebooting XBMC will fix the problem. Also using the "Add source" browser will enter the share without issue.
Reply
#7
Funny, I didn't think about it being a XBMC issue since I have the same delay trying to open things in Windows Explorer when I navigate to the Network Neighborhood (or whatever it's called these days) to find the fileserver on my network. I've fixed that before but I can't remember what I did. I needed my photos to show so I just mounted (sorry, mapped) the drive locally. That doesn't help find/fix bugs though, does it?
Reply
#8
triumvirrr Wrote:So the question is: Why does XBMC try to contact port 80 when browsing SMB?

I have really no idea since I only use MS native functions like wnetenum, wnetconnect2, etc. So I fully rely on MS without any ports chosen.
One way could be to add XBMC to the authorized apps (I found code for that) but I dunno if this will help.
Also Vista sometimes behaves weird. It took me half an hour to find the problem why no shares were shown. they weren't even shown in the vista network environment. After I enabled network access for file sharing I was able to see the hosts and shares in vista and XBMC.
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.
Reply
#9
I definitely didn't encounter the lags in 8.10, using the same machines with the same OS and the same firewall settings on both XBMC clientside and SMB serverside.

Have there been changes to the SMB client code since 8.10? Probably there the key can be found...

Of course, using shares mapped to a windows drive is a possible workaround, but it would mean to rebuild the whole media library with the new paths and also losing all the watched / unwatched information, which is especially with longer tv shows very bad :-(
Reply
#10
8.10 used the ported smb client from the samba package. It's rather old and didn't worked reliable (no browsing, streaming broke from time to time, etc).
To port the latest version is a huge effort and therefore I've decided to take the native way.
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.
Reply
#11
same problem here, if i open up port 80 on server it goes back to normal listing time. Can't understand why it would try to use port 80 since it's usually the port of a webserver.
Reply
#12
Just wanted to confirm that opening up port 80 also cleared up this issue for me. Very strange that XBMC is listed as a program allowed through the firewall and yet this happens. As mentioned very strange that it would block anything on port 80 of all things. My is build was from last week, sorry don't have the # off hand.
Reply
#13
ok, just to clarify....

to speed up root listings for xbmc via samba, you need to open port 80 on the smb host side, or the xbmc client side?

reason i ask is because i already have port 80 open on one media server for some web hosting, and its still slow to list root dirs.

regards,
Dam0
Reply
#14
any news on this?
Reply
#15
Same problem here using ikons' latest build. Fresh install of Tiny XP, shares work fine and snappy within Windows but take over a minute to show the root within XBMC via SMB.
Reply

Logout Mark Read Team Forum Stats Members Help
Samba - Access to root of each share extremely slow0