Delay in CIFS connection w/Windows Explorer

Status
Not open for further replies.

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
I'm having an issue with a production FreeNAS box where when first attempting to click on the CIFS share using Windows Explorer (Windows 7 and 8), Explorer just hangs for 15-30 seconds, then all subsequent connections are fine. Transfers seem snappy, and everything else seems to work OK. It's just that initial connection (once every hour or two it happens). It's driving us all nuts. This doesn't happen on our Windows server CIFS shares.

I saw the "green bar of death" fix on the internets, where you make sure everything in your NAS folders is "Customized" to "General" status (so it won't rebuild thumbnails on the whole share every time you connect). That doesn't seem to make any difference.

The HDD's are on "Always On," so it's not a HDD standby issue. I have 32GB of RAM in the box (total ZFS pool size is 6TB). The pool has plenty of space. I have one NIC card in the machine on the corporate subnet, so it's not a link aggregation issue (another scenario I read about with this issue).

Message log doesn't have any hints either.

FreeNAS version is 9.1.1.-RELEASE-x64 (a752d35)

Thanks for any leads.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Aslong as powerd is disabled.. Probably related to hostname lookup.. Does it do this if you access by IP?
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
I should have mentioned -- we map drives using IP addresses, not hostname.

Is there any possibility that it could be related to "Previous Versions?" That's one difference between my FreeNAS box (for our department) and the corporate NAS shares running on Windows Server. I keep snapshots -- they don't. I don't want to remove all the snapshots just to test this, but just wondering if it could be a possibility? Maybe I should try reducing the number of snapshots...

It definitely seems like it's some kind of timing issue -- something times out. If I wait an hour or two to access the share again, the delay happens. If it has only been ten or fifteen minutes since the last access, there's no issue.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Is powerd disabled? I had a problem exactly like yours about a year ago and powerd was the culprit along with some other issue(I can't remember what it was exactly).
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
Thanks, but yes, powerd is disabled on all disks.

Despite the fact we connect via IP, I put FREENAS1 into my department's DNS, and also asked the company admin to do the same for our general network. I also put it in the reverse lookup. The other thing I did was suggested here: http://support.microsoft.com/kb/297684 <-- I used the last step on my workstation (net config server /autodisconnect:-1). I haven't had the issue in the last hour or so. Might not be long enough to replicate the issue, but I'll continue to monitor it.

Seems this isn't an entirely heard of problem with Samba, but most issues seem to be related to winbindd or powerd/spindown.

Lots of info when searching for "samba initial authentication slow first" on the Googeley, but most of it I've tried so far.

My hunch is it's something with the authentication protocol between Win 7/8 and Samba, but that's just a hunch based on the fact that turning off the disconnect seems to be helping for now.

If I knew how to view that process in logs or in realtime, I could see if that's it.

Oh, and one more thing @cyberjock -- thanks for your help a while ago on my home FreeNAS server. Don't want to resurrect an older thread, but suffice it to say that *yet again* when you talk about MORE RAM PLEASE, we all should listen. ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
powerd isn't a disk thing.. it's a CPU thing.

I've been involved with win7, 8, and 8.1 and samba... so I can vouch that it does work without a delay!

Also, that option you set is not a good long-term option. It'll keep those connection from ever being disconnected and it could slow down the server overall because unused connections are never disconnected. The whole reason for the disconnection by default is to help minimize server load. Reconnecting shouldn't take more than a second or two.. so you should determine what the REAL problem is. For diagnostic testing, unless the problem is easily reproducible, it'll be hard to prove for certainty that it worked. And you definitely shouldn't roll out this fix to everyone at a business as the consequences could be.... painful. It'll affect every server connection, so you might actually hurt other servers!
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
There are only four of us in the department, but your point is taken. The main issue is my boss, who doesn't like to wait for the connection. I can wait 10-15 seconds, even though it's annoying. Perhaps I will give him this temporary "fix" while I restore my own workstation to 15 minutes and try to find the real issue. In fact, I think I will set it to two minutes for now and that should help me even more.

I thought you were talking about power control on the disks. Will report back. Thanks.

EDIT: powerd was off. Back to the drawing board.
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
Set the timeout to two minutes, waited five just to make sure, everything is OK. I suppose it's possible that adding the reverse lookup to our own DNS and adding the machine to the corporate DNS helped, even though we connect via IP? I also see before today that there are a lot of NMBD messages (every five minutes) about sending an election packet.

I actually added the IPv6 function to the current NIC and activated a second, unused NIC to a different subnet we use. So far, the shares on FreeNAS seem more responsive. Wish I had done one thing at a time, but for now it appears something helped. I'll post back here in a day or two if all is good.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Maybe place the ips/hostnames in the global host database..
 
Status
Not open for further replies.
Top