Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Tom Jobbin » Fri, 13 Aug 1999 04:00:00



Hi,

I have a two machine network: FreeBSD 3.1 on a PPro 200 with 40mb ram, and
Win98 on a PII-450 with 256mb ram.  I am using a crossover cable between
100mb/s Fast Ethernet cards, thus giving me a dedicated 100mb/s between the
two.

I want to use my FreeBSD machine as a file server, emulating NT to a limited
degree.  I've set up Samba 2.0.5a, configuring it as a Domain Controller,
and have been able to log into it succesfully from Win98.   I've disabled
password encryption on Win98 to make things simpler (using the .reg file
supplied with Samba).

Reading files from FreeBSD to Win98 is very fast - I get about 3mbytes/sec
transfer rates, which is the same as I get through FTP.  However, writing
files from Win98 to FreeBSD is extremely slow - somewhere in the region of
about 75kbytes/sec.  The method I am using to test this is simply to map a
FreeBSD share to a win98 drive letter, then to drag a large (30mb) file onto
that drive.

If I FTP from Win98 to FreeBSD and upload files, I get the same rate as when
I download - 3mbytes/sec.  If I run smbclient on the FreeBSD box to pull
shared files from Win98 I get a slower rate - 900kbytes/sec - but still very
much faster than when Win98 is doing the uploading.

The Win98 machine has very fast hard drives - LVD Ultra Wide SCSI.  The
FreeBSD machine has a very old 1gb IDE that is due to be replaced with a
UDMA model tomorrow.  I am not quite sure why I only get 900kb/sec through
smbclient, hwoever even this would be acceptable if I could get it when
uploading from Win98 to FreeBSD.

I've read through Speed.txt in the documents and made a couple of
modifications (e.g. enabled level 2 oplocks) but nothing seems to have made
any difference.  The problem must be with either Win98 or Samba, as it only
occurs when Win98 sends files to FreeBSD using Samba - FTP sending is fine

Any help on this would be much appreciated!

Tom

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Alexandr Boboshk » Fri, 13 Aug 1999 04:00:00


Same problem we have here. Samba 2.0.5a of FreeBSD 2.2.7 on
200Mhz Pentium and 166Mhz Win95 client. 100Mb/s cards over hub.
3Mb/sec from Samba, 75kb/sec to Samba.

Alexandr


> Hi,

> I have a two machine network: FreeBSD 3.1 on a PPro 200 with 40mb ram, and
> Win98 on a PII-450 with 256mb ram.  I am using a crossover cable between
> 100mb/s Fast Ethernet cards, thus giving me a dedicated 100mb/s between the
> two.

> I want to use my FreeBSD machine as a file server, emulating NT to a limited
> degree.  I've set up Samba 2.0.5a, configuring it as a Domain Controller,
> and have been able to log into it succesfully from Win98.   I've disabled
> password encryption on Win98 to make things simpler (using the .reg file
> supplied with Samba).

> Reading files from FreeBSD to Win98 is very fast - I get about 3mbytes/sec
> transfer rates, which is the same as I get through FTP.  However, writing
> files from Win98 to FreeBSD is extremely slow - somewhere in the region of
> about 75kbytes/sec.  The method I am using to test this is simply to map a
> FreeBSD share to a win98 drive letter, then to drag a large (30mb) file onto
> that drive.

> If I FTP from Win98 to FreeBSD and upload files, I get the same rate as when
> I download - 3mbytes/sec.  If I run smbclient on the FreeBSD box to pull
> shared files from Win98 I get a slower rate - 900kbytes/sec - but still very
> much faster than when Win98 is doing the uploading.

> The Win98 machine has very fast hard drives - LVD Ultra Wide SCSI.  The
> FreeBSD machine has a very old 1gb IDE that is due to be replaced with a
> UDMA model tomorrow.  I am not quite sure why I only get 900kb/sec through
> smbclient, hwoever even this would be acceptable if I could get it when
> uploading from Win98 to FreeBSD.

> I've read through Speed.txt in the documents and made a couple of
> modifications (e.g. enabled level 2 oplocks) but nothing seems to have made
> any difference.  The problem must be with either Win98 or Samba, as it only
> occurs when Win98 sends files to FreeBSD using Samba - FTP sending is fine

> Any help on this would be much appreciated!

> Tom


 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Kenneth Furg » Fri, 13 Aug 1999 04:00:00



> Any help on this would be much appreciated!

Mount the filesystem that your shares reside on as "async".  To change
it on the fly type "mount -u -o async /filesystem".  You will see your
writes speed up considerably.  This speedup, however, comes at a cost.
The chance of damaging your filesystem because of an unexpected power
interruption increases significantly.  To get the best of both worlds,
consider compiling in support for soft-updates.

- K.C.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Tom Jobbin » Sat, 14 Aug 1999 04:00:00


Quote:> Mount the filesystem that your shares reside on as "async".  To change
> it on the fly type "mount -u -o async /filesystem".  You will see your
> writes speed up considerably.  This speedup, however, comes at a cost.
> The chance of damaging your filesystem because of an unexpected power
> interruption increases significantly.  To get the best of both worlds,
> consider compiling in support for soft-updates.

Thanks, but it's definitely not a hard disk issue.

As I mentioned, I can write to the same drive via FTP at 3mb/sec.  But when
using Samba, it falles to 75kb/sec.  So it's something to do with Samba, or
Win98's interaction with Samba.

I already have softupdates enabled on the partition.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Kenneth Furg » Sat, 14 Aug 1999 04:00:00



> Thanks, but it's definitely not a hard disk issue.

> As I mentioned, I can write to the same drive via FTP at 3mb/sec.  But when
> using Samba, it falles to 75kb/sec.  So it's something to do with Samba, or
> Win98's interaction with Samba.

> I already have softupdates enabled on the partition.

Great.  Here are the bits out of my smb.conf file that matter:

        read prediction = True
        socket options = TCP_NODELAY
        read raw = yes
        write raw = yes
        max xmit = 16384

A little rough testing on my 10Mbit lan, I am getting about 743K/sec
client->server writes with these settings.  The server is a P100 with an
SMC ISA ethernet card running FreeBSD 2.2.8-stable, Samba 1.9.18p1 and
filesystems mounted sync.  Client is only marginally more powerful and
is running win95.  My win98 clients are seeing similar numbers.

- K.C.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Vlad Marchenk » Mon, 16 Aug 1999 04:00:00


Hi

 I've FreeBSD 3.2 P-II-333,64,IBM UWSCSI,I-Pro100?. I had samba 2.0.4
installed and everything was fine. Then i installed samba 2.0.5 and now
i have the same problem - writing from clients (win nt and win98) to
samba are VERY SLOW.

 How to solve this problem? any proposition?

Thanx.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Richard Yeardl » Mon, 16 Aug 1999 04:00:00


On Sun, 15 Aug 1999 12:57:49 +0300, Vlad Marchenko


>Hi

> I've FreeBSD 3.2 P-II-333,64,IBM UWSCSI,I-Pro100?. I had samba 2.0.4
>installed and everything was fine. Then i installed samba 2.0.5 and now
>i have the same problem - writing from clients (win nt and win98) to
>samba are VERY SLOW.

> How to solve this problem? any proposition?

>Thanx.

I had the same problem - about 950KB/sec reads but only 100KB/sec
writes.  I fixed it by going back to 2.04.  In doing so something went
awry and trashed the *entire* file system - it took me about three
hours to recover my files.  After re-installing FreeBSD w/Samba 2.04
everything was speeding along quite nicely again - 950KB/sec both
ways.

Rich.

(Don't forget to remove NOSPAM)
--
FBSD3.2R : IBM PR233 : 64MB RAM : 4.3GB HD : V90 modem : NE2000 PCI NIC
Apache 1.3.6+PHP 3.12 : named : socks5 : ipfw : mysql 3.22 : samba 2.04

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Mike Squir » Mon, 16 Aug 1999 04:00:00




Quote:>Same problem we have here. Samba 2.0.5a of FreeBSD 2.2.7 on
>200Mhz Pentium and 166Mhz Win95 client. 100Mb/s cards over hub.
>3Mb/sec from Samba, 75kb/sec to Samba.

I'm getting 2.6MB/sec writes using the old Netware TESTNET.EXE program
which writes out 1000 65K blocks.  xperfmon++ on the host shows the same
thing.

This is samba 2.0.2, FreeBSD 3.1-Release SMP with dual PPro200 using the
Everex PO-6200 MB, 64MB RAM, Adaptec 2944UW with 3 Quantum 9GB diff drives
(which clock at about 9MB/sec using bonnie, locally).

Client is a PPro200 running NT4, connected to the host via a 3Com 100Mbit full
duplex switch (although routed through our backbone via a Cisco 7xxx router
which cuts througput quite a bit, building switch is not very smart).

I've done nothing special; only significant difference from some other systems
is the Pro100B, which is my favorite Ethernet card.

Mike Squires

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Tom Jobbin » Mon, 16 Aug 1999 04:00:00


Quote:> I had the same problem - about 950KB/sec reads but only 100KB/sec
> writes.  I fixed it by going back to 2.04.  In doing so something went
> awry and trashed the *entire* file system - it took me about three
> hours to recover my files.  After re-installing FreeBSD w/Samba 2.04
> everything was speeding along quite nicely again - 950KB/sec both
> ways.

Yup, this is my experience too.

After doing some more experimentation, I found that my 75kb/sec on 2.0.5a
writes improved to 300kb/sec on 2.0.4b - stil;l pretty crap, but noticeably
better.

Then, the weird part - I have found that if I run smbd with a log level
higher than 5, writes improve to about 1.5mb/sec.  This is despite the docs
warning that enabling a higher log level will reduce performance.

So now when I run Samaa 2.0.4b with the -d 5 flag, I get approx 1.5mb/sec
writes - still significantly worse than I get through FTP (about 5mb/sec
writing to/from the same drives) - but usable.

I've posted a bug report to the Samba team about this.

Tom

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Jeremy Allis » Tue, 17 Aug 1999 04:00:00



>> I had the same problem - about 950KB/sec reads but only 100KB/sec
>> writes.  I fixed it by going back to 2.04.  In doing so something went
>> awry and trashed the *entire* file system - it took me about three
>> hours to recover my files.  After re-installing FreeBSD w/Samba 2.04
>> everything was speeding along quite nicely again - 950KB/sec both
>> ways.
>Yup, this is my experience too.
>After doing some more experimentation, I found that my 75kb/sec on 2.0.5a
>writes improved to 300kb/sec on 2.0.4b - stil;l pretty crap, but noticeably
>better.
>Then, the weird part - I have found that if I run smbd with a log level
>higher than 5, writes improve to about 1.5mb/sec.  This is despite the docs
>warning that enabling a higher log level will reduce performance.
>So now when I run Samaa 2.0.4b with the -d 5 flag, I get approx 1.5mb/sec
>writes - still significantly worse than I get through FTP (about 5mb/sec
>writing to/from the same drives) - but usable.
>I've posted a bug report to the Samba team about this.

But did you try the test patch I posted a few days ago ?

The difference in 2.0.4 and 2.0.5 w.r.t. the socket code
is we moved to using recv/send instead of read/write on
sockets. Can you try the patch (which goes back to using
read instead for a test) and please report back if it fixes
the speed problem on FreeBSD ? I need some help from
FreeBSD users here please.

Regards,

        Jeremy Allison,
        Samba Team.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Andrei Maistrenk » Tue, 17 Aug 1999 04:00:00



Quote:>[snipped]

> But did you try the test patch I posted a few days ago ?

> The difference in 2.0.4 and 2.0.5 w.r.t. the socket code
> is we moved to using recv/send instead of read/write on
> sockets. Can you try the patch (which goes back to using
> read instead for a test) and please report back if it fixes
> the speed problem on FreeBSD ? I need some help from
> FreeBSD users here please.

> Regards,

> Jeremy Allison,
> Samba Team.

Yes it does work.  I tried it on FreeBSD-3.2-Stable server Samba version
2.0.5a.  Writes to the server went from 100kbytes/s to 1000kbytes/s on a
10Mbit lan.  Read speed was unaffected but was also 1000kbytes/s.  Client
was NT server 4.0 SP5.

Andrei Maistrenko

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Jeremy Allis » Tue, 17 Aug 1999 04:00:00



>Yes it does work.  I tried it on FreeBSD-3.2-Stable server Samba version
>2.0.5a.  Writes to the server went from 100kbytes/s to 1000kbytes/s on a
>10Mbit lan.  Read speed was unaffected but was also 1000kbytes/s.  Client
>was NT server 4.0 SP5.

Ok, thanks for the confirmation. Now I nweed to work out
with the FreeBSD guys why this change has such a great
effect. It may be that the use of the MSG_WAITALL flag in
the recv() call is causing problems.

Thanks,

        Jeremy Allison,
        Samba Team.

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Andrei Maistrenk » Tue, 17 Aug 1999 04:00:00





> >[snipped]

> > But did you try the test patch I posted a few days ago ?

> > The difference in 2.0.4 and 2.0.5 w.r.t. the socket code
> > is we moved to using recv/send instead of read/write on
> > sockets. Can you try the patch (which goes back to using
> > read instead for a test) and please report back if it fixes
> > the speed problem on FreeBSD ? I need some help from
> > FreeBSD users here please.

> > Regards,

> > Jeremy Allison,
> > Samba Team.

> Yes it does work.  I tried it on FreeBSD-3.2-Stable server Samba version
> 2.0.5a.  Writes to the server went from 100kbytes/s to 1000kbytes/s on a
> 10Mbit lan.  Read speed was unaffected but was also 1000kbytes/s.  Client
> was NT server 4.0 SP5.

> Andrei Maistrenko

Further update:

I have tried the same patch on a different machine with the same version of
FreeBSD.  Now the result is different.  The speeds remained the same.  The
settings in the smb.conf files were as similar as possible.  Now the client
was a Win98.  Also the network is 100Mbit now and both client and server use
3com FastEtherlink XL adapters.  Write speed tops out at 350kbytes/s where
reads can go as high as 6500kbytes/s.  I have double checked by using ftp
and both reads and writes are at about 5000-7000kbytes/s.
The setup that benefited from the patch used a generic Realtek 8029 NE2000
PCI card on the server and an Intel 100Mbit card on the client.
I am at loss as to why is there a difference.  I have tried to eliminate any
dissimilarities between the setups.

Andrei Maistrenko

 
 
 

Samba 2.0.5 on FreeBSD 3.1-RELEASE - very very slow writing to Samba from win98

Post by Tom Jobbin » Wed, 18 Aug 1999 04:00:00



Quote:> But did you try the test patch I posted a few days ago ?

> The difference in 2.0.4 and 2.0.5 w.r.t. the socket code
> is we moved to using recv/send instead of read/write on
> sockets. Can you try the patch (which goes back to using
> read instead for a test) and please report back if it fixes
> the speed problem on FreeBSD ? I need some help from
> FreeBSD users here please.

Yes, I've now tried applying the patch (sorry, I didnt notice it until you
mentioned it in your post to me)

Samba 2.0.5a now performs exactly as Samba 2.0.4b does.

I am still getting slow writes (About 300kb/sec) when I write normally.  As
soon as I increase the log level on smbd to 5 or more, it goes up to about
1.5mb/sec  - which is still much lower than I get through FTP (5mb/sec).
However, with a higher log level, reads are then slower

I currently have the situation where I run smbd with log level 0 when I plan
to do mostly reading from my drive, then increase it to 5 if I need to write
files - not particularly desirable!

If you need any other info or stats from me, let me know

Thanks,

Tom