Access the first file thru Samba is SLOW

Access the first file thru Samba is SLOW

Post by Jo » Wed, 02 Jul 2003 09:52:29



Hi Samba fans,

Accessing files (both read/write) thru Samba seems to be quite slow.

Details:
accessing the first file is very slow (20+ sec), after that access other files
(or the same files) is under 1 sec. If I don't access any of the files for
awhile, the problem happens again.

My config is:
- client is Windows 2000
- Samba server is run in Solaris

Another possible cause of problem is that all those files live in
a single directory; it has 5000+ files there.
And I don't think I can change this stupid file structure.

My guess is: when the connection is established, things go fast.
When cache of the directory is established, things go fast.

Question:

Could you give me pointers to possible cause of the problem
and suggestion to improve it?
[I have access to SysAdmin of both the client and server sides]

Thank in advance.

J.

 
 
 

Access the first file thru Samba is SLOW

Post by Matt Pearc » Wed, 02 Jul 2003 11:58:47


The problem is with Windows trying to use a protocol or service to access
the share that Samba doesnt recognise I beleive.  In windows XP the easy
solution I found was to disable the WebClient service and that fixed it for
me and numerous others.

Also make sure you have got the right registry patches applied to you
windows boxes and you are running that 2.2.8a(latest samba version)

Give it a go and let us know how things go.

Matt.


Quote:> Hi Samba fans,

> Accessing files (both read/write) thru Samba seems to be quite slow.

> Details:
> accessing the first file is very slow (20+ sec), after that access other
files
> (or the same files) is under 1 sec. If I don't access any of the files for
> awhile, the problem happens again.

> My config is:
> - client is Windows 2000
> - Samba server is run in Solaris

> Another possible cause of problem is that all those files live in
> a single directory; it has 5000+ files there.
> And I don't think I can change this stupid file structure.

> My guess is: when the connection is established, things go fast.
> When cache of the directory is established, things go fast.

> Question:

> Could you give me pointers to possible cause of the problem
> and suggestion to improve it?
> [I have access to SysAdmin of both the client and server sides]

> Thank in advance.

> J.


 
 
 

Access the first file thru Samba is SLOW

Post by Mark » Wed, 02 Jul 2003 17:40:15




Quote:> The problem is with Windows trying to use a protocol or service to access
> the share that Samba doesnt recognise I beleive.

Huhhh???

Quote:> In windows XP the easy solution I found was to disable the WebClient service and that fixed it for
> me and numerous others.

 True, however OP is using win2000

Quote:> Also make sure you have got the right registry patches applied to you
> windows boxes and you are running that 2.2.8a(latest samba version)

There are no patches needed for windows except for the WinXP signorseal
patch. Win2000 + SP4 is still being, will be ironed out, after all
Win20000 SP4 is only days old.... See Shaun Marolf's post in linux.samba
for more info. Do a google groups search for sp4 profile issue update.

> Give it a go and let us know how things go.

> Matt.



> > Hi Samba fans,

> > Accessing files (both read/write) thru Samba seems to be quite slow.

> > Details:
> > accessing the first file is very slow (20+ sec), after that access other
> files
> > (or the same files) is under 1 sec. If I don't access any of the files for
> > awhile, the problem happens again.

> > My config is:
> > - client is Windows 2000
> > - Samba server is run in Solaris

> > Another possible cause of problem is that all those files live in
> > a single directory; it has 5000+ files there.
> > And I don't think I can change this stupid file structure.
Big problem....

> > My guess is: when the connection is established, things go fast.
> > When cache of the directory is established, things go fast.
True....

> > Question:

> > Could you give me pointers to possible cause of the problem
> > and suggestion to improve it?

See "Big problem" above
Try adding to [global]
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=12000

Quote:> > [I have access to SysAdmin of both the client and server sides]

> > Thank in advance.

> > J.

--
Regards,
Mark
Samba Setup Guide
www.samba.netfirms.com
 
 
 

Access the first file thru Samba is SLOW

Post by Matt Pearc » Wed, 02 Jul 2003 20:38:12


yes he is, and I should have mentioned to make sure you disable any
protocols that you arnt using such as IPX etc cause these can also cause
problems.

Matt.




> > The problem is with Windows trying to use a protocol or service to
access
> > the share that Samba doesnt recognise I beleive.
> Huhhh???

> > In windows XP the easy solution I found was to disable the WebClient

service and that fixed it for
> > me and numerous others.

>  True, however OP is using win2000

> > Also make sure you have got the right registry patches applied to you
> > windows boxes and you are running that 2.2.8a(latest samba version)
> There are no patches needed for windows except for the WinXP signorseal
> patch. Win2000 + SP4 is still being, will be ironed out, after all
> Win20000 SP4 is only days old.... See Shaun Marolf's post in linux.samba
> for more info. Do a google groups search for sp4 profile issue update.

> > Give it a go and let us know how things go.

> > Matt.



> > > Hi Samba fans,

> > > Accessing files (both read/write) thru Samba seems to be quite slow.

> > > Details:
> > > accessing the first file is very slow (20+ sec), after that access
other
> > files
> > > (or the same files) is under 1 sec. If I don't access any of the files
for
> > > awhile, the problem happens again.

> > > My config is:
> > > - client is Windows 2000
> > > - Samba server is run in Solaris

> > > Another possible cause of problem is that all those files live in
> > > a single directory; it has 5000+ files there.
> > > And I don't think I can change this stupid file structure.
> Big problem....

> > > My guess is: when the connection is established, things go fast.
> > > When cache of the directory is established, things go fast.
> True....

> > > Question:

> > > Could you give me pointers to possible cause of the problem
> > > and suggestion to improve it?
> See "Big problem" above
> Try adding to [global]
> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=12000

> > > [I have access to SysAdmin of both the client and server sides]

> > > Thank in advance.

> > > J.

> --
> Regards,
> Mark
> Samba Setup Guide
> www.samba.netfirms.com

 
 
 

Access the first file thru Samba is SLOW

Post by Jo » Fri, 04 Jul 2003 06:52:57


I messed up the follow-up to my original posting.
Here we go again.

After reading all the postings (THANKS!), I did a bit of research.
This is what I found:

1. In my client machine
- it is a Window 2000 5.00.2195 Service Pack 2
- it has only one active network connection (netelligent 10/100 tx pci)
---- it has three components
---- 1. client for microsoft network
---- 2. file and print sharing for microsoft networks
---- 3. internet protocol tcp/ip

2. For the samba running in Solaris 5.8,
- the samba version running there is 2.2.4
- it has the parameter TCP_NODELAY set

3. When I access the remote files, I ALWAYS use UNC
"e.g., \\remote_host\share\..."
instead of having the remote drive mapped.

I do that because this way I don't need to worry
about re-map the drive if the connection goes away.
I wonder if there is a feature that allow Windows
to automatically re-map the drive when a broker drive
is accessed??

QUESTION:

- Since my window 2000 is in SP2, does it mean I can ignore
the Shaun Marolf's SP4 issue? Is there more I can do in the
client side?

- Should I install some newer SP to the win2k?

- My samba is in 2.2.4, should I upgrade to a newer version?
What version is good and less trouble for me?

 
 
 

1. why is samba so slow with many files in one directory?

I am trying to use Samba as a fileserver for Windows NT 4.0 with
directories with many, many files in them.

Normally we have 100,000 files per directory (each 1k to 100 k in
size). When we use Windows NT Server as fileserver it works fine, but
Samba is much to slow.
I tried it at home with about 4000 files in one directory on a Pentium
100 and i get over 90% CPU usage when opening or copying files in that
directory.

Is there a catch 22 to get Samba working faster or does it really bog
down with thousands of files per directory?

Yours,
        Hubert Gruenheidt

2. Calculating the sum of the differences between elements

3. 2 Samba servers - one slow one fast ?!

4. Excluding Items in Roaming Profiles

5. permissions (Need this one please i am in a bottle neck with this one)

6. Workstation information

7. Samba file shares SLOW to access on XP Pro

8. National Instruments' DAQ-700 PCMCIA

9. Slow file access from NT via Delphi on Solaris 2.5 files

10. SAMBA slow in one direction, reading from SAMBA

11. Slow file serving to one client PC

12. Connectiond and opening first file slow

13. Slow file transfers in one direction